I have a MySQL stored procedure. I would like to have a stored procedure run some statements, then call a Java program. Then when the java program is complete, the stored procedure should finish.
The java program will connect to the database, do some analysis and then insert rows into other tables.
Is this possible?
Yes. Take a look at The MySQL UDF Repository and the sys_exec function. You could use this to launch your Java code in a new JVM.
After you get that installed here is how you run it: https://dba.stackexchange.com/a/39547/14506
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With