I want to make an update trigger execute a Java program.
I have a table
T1 with a column named
Flag changes, I want to run a trigger that results in an execution of a Java program.
Is this possible?
I know this post is fairly old and sorry for picking it up but I recently had the same requirement, so I created a MySQL UDF that uses JNI to call Java code from within a MySQL trigger. I'm posting this as a reference for similar future requests. I've checked in the code in bitbucket. You can download it from here:
Then, for example, you can write your own trigger calling the sys_exec like this:
There are other useful functions in this library:
More info here
Try it on a dev env and...
But anyway, I agree with the proposal of Remus Rusanu