-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: The use of PostUpdateEventListener in Hibernate 3
PostPosted: Tue May 02, 2006 10:25 pm 
Newbie

Joined: Tue May 02, 2006 10:22 pm
Posts: 8
I am using Hibernate 3 as my persistence layer.

I want to track the successful update cases and do some tasks. I do this by using the PostUpdateEventListener. But I find it does not work. The PostUpdateEventListener will be called even in the failed update case (e.g. String too long). Are there any ways to check if it is a successful update case?

Thanks in advance.


Top
 Profile  
 
 Post subject: Re: The use of PostUpdateEventListener in Hibernate 3
PostPosted: Wed May 03, 2006 3:49 am 
Senior
Senior

Joined: Mon Aug 22, 2005 5:45 am
Posts: 146
smallsunw wrote:
I am using Hibernate 3 as my persistence layer.

I want to track the successful update cases and do some tasks. I do this by using the PostUpdateEventListener. But I find it does not work. The PostUpdateEventListener will be called even in the failed update case (e.g. String too long). Are there any ways to check if it is a successful update case?

Thanks in advance.


you can use event.getOldState() and event.getState() to see what has happened.

_________________
Please don't forget to give credit, if my posting helped to solve your problem.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 03, 2006 4:55 am 
Newbie

Joined: Tue May 02, 2006 10:22 pm
Posts: 8
Thanks for your help.

But getOldState() and event.getState() only give the old values and new values of the persistence object.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.