-->
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: Placing sessionFactories in JNDI Context with Tomcat
PostPosted: Mon Aug 23, 2004 11:15 am 
Newbie

Joined: Fri Mar 19, 2004 2:09 pm
Posts: 3
Location: Edwardsville, IL
2.1.6:
MS SQL Server 2000:

I am trying to implement the Open Session in View Pattern, and am having trouble instantiating the session factory. I am currently using the built-in Bean Factory, but don't think that will work. Am I correct in assuming that I will need to create my own ObjectFactory in order to create sessionFactories in Tomcat?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 23, 2004 11:22 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Read the documentation about "using your own JNDI InitialContext", download the Sun Filesystem JNDI context. Don't try anything else, all other ways will lead you into classloader hell.

If you are looking for a simple way to manage your SessionFactory, copy the HibernateUtil class from chapter 1 of the documentation.

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


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.