• Post Reply Bookmark Topic Watch Topic
  • New Topic

java class from mysql trigger how

 
praveen sharma
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

Anyone who knows how to call java servlet or java class method from MYSQL.Now in detail

I have to insert a record in a table. That table has a trigger on it. On Insert of a record trigger get called and it need to send SMS and email from java class but the problem is that trigger checks a condition if satified then only it calls java class otherwise it execute normally.

If anyone has implemented it,will be a great help !!

Regards
Praveen Sharma
 
Paul Clapham
Sheriff
Posts: 21963
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's a link to the MySQL documentation for setting up triggers:

http://dev.mysql.com/doc/refman/5.4/en/triggers.html

You could look through there -- I haven't -- but I very much suspect that MySQL hasn't implemented triggers written in Java yet. So you'd have to write a trigger as a stored procedure (also documented at that link) which somehow sent a message to something which was written in Java and was running somewhere else.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!