Re: Triggers?: "Is it possible to create a trigger that can execute a
java class?"
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!
Monday, January 24, 2005
Subscribe to:
Post Comments (Atom)
Popular Posts
- AS400 Job Scheduler
- Recover or reset QSECOFR passwords
- Make a Home made, open source mp3 Player
- UDATE and *DATE in AS400 RPG
- Sending and receiving email on i5/os - QtmmSendMail
- A free fully functional database is yours with Microsoft's SQL Server Express
- AS400 API - QCMDEXC - Execute Command
- API Example - Deleting Old Spooled Files
- AS400 Jobs: Do you have a job at the moment?
- 3 fires up high-speed Super 3G network, News at CNET.co.uk
No comments:
Post a Comment