permaculture playing cards*
The moose likes Object Relational Mapping and the fly likes Is there any hibernate listener to handle any updates in db? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Is there any hibernate listener to handle any updates in db?" Watch "Is there any hibernate listener to handle any updates in db?" New topic
Author

Is there any hibernate listener to handle any updates in db?

stshiva raaj
Greenhorn

Joined: Sep 23, 2008
Posts: 13
Hi,
I am using Hibernate3.2 and i have to get the task updation count with using big query. The task updation happen periodically in background. When i fetch the count at first time from database its taking long time. Second time pretty fast due to cache. If any updation happen in database third time its take long time.

Is there any hibernate listener to handle any updates in database by any other server?

Is there any way to find the updation happen or not without hitting the database? I can match the existing count and database's current count programmatic.
T Mishra
Ranch Hand

Joined: Apr 04, 2006
Posts: 107

I think these classes may be helpful - DefaultUpdateEventListener. <XXXX>UpdateEventListener where XXXX -> Pre, Post, SaveOrUpdate etc. You can use it with Interceptors. An example here.


Thanks,
Tushar (SCJP 1.5)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is there any hibernate listener to handle any updates in db?
 
Similar Threads
Call action class from timertask's run method
Standard way to handle Repository in JPA
Can I be informed of a database update?
Does �Hibernate� provide these features?
Hibernate Transaction Autocommit set to false