joe conery wrote:
> I have a java app with the JDBC connector. Is
> there any way that I could use a trigger (or
> anything else) to have mysql invoke a callback
> function in my java app? I'm trying to refresh a
> JTable whenever the db is written to. I don't want
> to needlessly do a screen refresh every 20 secs.
> or so, just to keep it up to date. I was hoping
> the trigger could call back to a function in my
> app when a certain table on-write - thanks.
Joe,
You _could_ use any language to write a UDF (judf from
http://freshmeat.net/projects/judf/ springs to mind here, since that would allow you to write a UDF in Java) that makes a socket connection to your application, or enqueues a JMS message, etc. to do the notification.
-Mark
Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html