-->
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.  [ 3 posts ] 
Author Message
 Post subject: session.close() and pool connection
PostPosted: Thu Apr 20, 2006 9:10 am 
Newbie

Joined: Tue Apr 18, 2006 9:57 am
Posts: 18
when i used the session.close() and how i get a new session(), i need to create a pool manager.

With the pool connection i have less problems with my web applications.
What is the code to manage the pool and how i close the session and open again.

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 20, 2006 10:02 am 
Expert
Expert

Joined: Tue Dec 07, 2004 6:57 am
Posts: 285
Location: Nürnberg, Germany
Maybe you wanna have a look at the HibernateUtil class in Caveat Emptor.

_________________
Please don't forget to rate


Top
 Profile  
 
 Post subject: Re: session.close() and pool connection
PostPosted: Thu Apr 20, 2006 10:12 am 
Regular
Regular

Joined: Wed Feb 22, 2006 11:28 am
Posts: 65
Location: Santiago, Chile
[quote="mcorrea"]when i used the session.close() and how i get a new session(), i need to create a pool manager.

With the pool connection i have less problems with my web applications.
What is the code to manage the pool and how i close the session and open again.

Thanks[/quote]

Hello Friend:

You can use JNDI tu get your hibernate Session, because JNDI is a feature provided by you application Server.

At your application Server, you can config JNDI to your datasource and also their connection pool.

So when you get a Hibernate´s Session, (openSession), it will go to Application Server to get a Connection in their pool, when you close your Session, it will turn Connection to the Pool.

You can look at your Application Server configuration and change your Hibernate Configuration File to load JNDI.

Requests for comments.


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