-->
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: Is extending persistence pattern thread scope ?
PostPosted: Thu Mar 01, 2012 9:01 pm 
Newbie

Joined: Tue Feb 28, 2012 2:35 pm
Posts: 3
I was reading Hibernate's extending persistence pattern, since Session or EntityManager is not thread safe, I am wondering this pattern is only for single thread?

with multiple threads, does secondary cache help on this pattern?


Top
 Profile  
 
 Post subject: Re: Is extending persistence pattern thread scope ?
PostPosted: Fri Mar 02, 2012 4:43 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Quote:
I am wondering this pattern is only for single thread?


No, it is also for multithreaded applications.
You just have to assure that each thread is working with his own Session or EntityManager instance.

Quote:
does secondary cache help on this pattern?

No.


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.