Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
stshiva raaj
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 108
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic