-->
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.  [ 1 post ] 
Author Message
 Post subject: Hibernate version getting updated on query.list()!
PostPosted: Tue Nov 02, 2010 11:34 am 
Newbie

Joined: Tue Nov 02, 2010 10:58 am
Posts: 2
Hello,

This is happening when ejb service call is made via HttpRequest post method to get Objec A. Once this ejb service is invoked, the control goes to the backend and Object A is retrieved. While in the backend another call is made to query more objects in the same ejb session.

I noticed when the query.list() is called to get more objects, the object A version is getting incremented. So, each time query.list() is executed the version gets updated by 1, therfore, the query.list() is called twice in this case, the version is incremented by 2.

This whole thing is the side effect of implementing interceptor for audting purposes using onFlushDirty(). This causes save errors if the retrieved object is already in the session with the old version.

Any insight will be appreciated.

Thank you!


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

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.