-->
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: SessionFactory
PostPosted: Wed May 07, 2008 12:39 pm 
Newbie

Joined: Fri Apr 04, 2008 9:12 am
Posts: 5
Is SessionFactory thread safe?

The Hello example uses a helper class to make sure there's only one SessionFactory. Is this the recommended way to build Hibernate applications?

Thanks in advance


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 07, 2008 2:25 pm 
Red Hat Associate
Red Hat Associate

Joined: Mon Aug 16, 2004 11:14 am
Posts: 253
Location: Raleigh, NC
Yes it is thread safe, try reading the Javadoc:

http://www.hibernate.org/hib_docs/v3/ap ... ctory.html

"Implementors must be threadsafe."

Also, the manual is a good place to start.

http://www.hibernate.org/hib_docs/v3/re ... pp-helpers

_________________
Chris Bredesen
Senior Software Maintenance Engineer, JBoss


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.