Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to execute java function after update in mysql table

 
Rohit More
Greenhorn
Posts: 10
Hibernate Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everyone,
My motive is to create insert trigger/ event on table and execute some java function.
I am using mysql database with hibernate.

Is there any functionality provided by hibernate?
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 35976
422
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A trigger happens on the database level. If your database supports Java stored procedures, you can use that.

If not, you'd need to add logic to the relevant method in your code to call the desired Java function.
 
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!