-->
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.  [ 18 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Tue Sep 07, 2004 3:50 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
There's nothing wrong with this, its just a... uncommon and sometimes a lot of effort to get right.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 07, 2004 6:59 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Use SessionFactory.evict()

Evicting from current sessions would be incredibly evil, which was what this thread was about.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 08, 2004 1:08 pm 
Beginner
Beginner

Joined: Tue Feb 10, 2004 2:30 pm
Posts: 25
We had a similar issue within an MDB JMS implementation. We ended up using a ThreadLocal pattern to maintain open Sessions between each MDB onMessage() call and put in specific transaction handling code to make sure Level 1 caches were cleared on commit() or rollback(). Sessions are really only closed if the container kills the thread due to inactivity. Level 2 cache updates were an easy add on once the base Session handling was clean.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 18 posts ]  Go to page Previous  1, 2

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.