We do this now, but you have to write a little wrapper around the Java to get it to be called from the trigger. We've actually accomplished this on V5R1 via creating a Java Stored procedure, and then calling that stored procedure via an SQL trigger. This is nice because the DB is managing the lifecycle of the JVM, and I believe the startup cost of the JVM only has to be paid once per job. We've also created a small externally defined trigger in a high level language that actually calls/submits a call to run a Java class. This works ok as well, except that the JVM has to be started for each call. That may not be an issue if this is on a slowly changing file. I would just say that in either of these methods you want to make sure that you realize exactly how often this trigger is going to be called. It is very easy to end up in a bad situation if you attach a trigger to a file that has transactions performed on it often. You'll either slow down your operations tremendously using the first method, or end up with too many jobs submitted for the system to handle in a timely manner in the second. Just be careful! Chris DeLashmutt Senior R&D Analyst LeasePlan USA 1165 Sanctuary Pkwy., Alpharetta, GA 30004 Phone: 678-202-8695 Fax: 678-921-4895 ClearCase problems? Check out the LeasePlan ClearCase FAQ for answers! "cornelius, chad" <chad.cornelius@xxxxxxxxxx To: "'java400-l@xxxxxxxxxxxx'" <java400-l@xxxxxxxxxxxx> tate.co.us> cc: Sent by: Subject: Triggers? java400-l-bounces@midrange .com 01/21/2005 12:13 PM Please respond to Java Programming on and around the iSeries / AS400 Does anyone know if it is possible to create a trigger that can execute a java class? Thanks, Chad -- This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/java400-l or email: JAVA400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/java400-l.
This mailing list archive is Copyright 1997-2013 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact