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.  [ 2 posts ] 
Author Message
 Post subject: Possible bug in evict() under certain circumstances?
PostPosted: Tue May 23, 2006 11:01 am 
Newbie

Joined: Tue Mar 22, 2005 6:45 am
Posts: 15
Hibernate version: 3.0

Hi, we are using a long lived session and managing our own transactions to maintain a conversation over multiple transactions. What we are trying to do is to make our transaction rollback handling code get the Hibernate session cache back in sync after a rollback.

The scenario is that we create a new hibernate pojo and then something after that causes that unit of work to fail so we get the Transaction from the session and issue a rollback. We then, for each pojo touched within that unit of work, use the evict method to remove it from Hibernate.

However in the subsequent transaction's commit (this time without it rolling back) we get the "possible nonthreadsafe access to session" assertion failure from the EntityInsertAction class.

It appears that the insert action from the previous rolled back transaction is still in the ActionQueue, and because we have evicted the pojo that the EntityInsertAction refers to this assertion is triggered (Its assuming that a different thread has deleted that pojo I guess - but it hasn't, we've just evicted it).

Shouldn't the evict() method clean up any references to that evicted pojo from the ActionQueue or am I missing something here?

many thanks,
Mike

_________________
Michael Hurd
Software Engineer
Nexagent LTD


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 06, 2006 5:29 am 
Newbie

Joined: Tue Mar 22, 2005 6:45 am
Posts: 15
Sorry to bump, but anybody from the Hibernate team have any thoughts on this?

_________________
Michael Hurd
Software Engineer
Nexagent LTD


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.