This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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: 25
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)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is there any hibernate listener to handle any updates in db?