aspose file tools*
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 Spring in Action this week in the Spring 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: 27
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: 108

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)
 
Consider Paul's rocket mass heater.
 
subject: Is there any hibernate listener to handle any updates in db?