-->
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: Connection pool not closing when application is stopped
PostPosted: Sat Jun 10, 2006 10:25 am 
Newbie

Joined: Sat Jun 10, 2006 10:23 am
Posts: 2
Hi there,
I have a EJB project deployed to WebSphere 6.0.2.9 and it works just fine.
I am using Hibernate and Commons DBCP for my database access and connection pooling against an Oracle 10g database.

My issue is that when I stop my application from the WebSphere console the application created connections remain open/active in Oracle.

There seems to be no way to force them to close short of stopping the WebSphere server itself.

Does anyone have any experience with this? Is there an elagant way to close the pool when the application is stopped?

I have tried c3p0 and DBCP and the behaviour above is seen using both of these connection pools.

Any help or insight is greatly appreciated.

Thanks
Sean


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 10, 2006 10:53 am 
Newbie

Joined: Sat Mar 18, 2006 1:13 am
Posts: 10
It is the job of the application server (Websphere, JBoss, etc.) to manage the connection pool. Hibernate just interacts with the pool created and managed by the appserver.

Is there a compelling reason to shut down the connections when the application stops? The appserver believes the answer is no, because other applications (still running) on the appserver can (if they are configured to do so) still make use of them. Likewise, should your application restart (within the already running appserver), it can make use of the pool as well.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 10, 2006 11:16 am 
Newbie

Joined: Sat Jun 10, 2006 10:23 am
Posts: 2
Hi, thanks for the response.

I agree with your statements 100% about the app server.
There are no other applications that will use the pool.

The issue I see is that if I restart the application it creates a new pool of 5 connections so now I have 10 connections.
If I stop and re-start I get 5 more etc.

Over time the connections will just keep gorowing and growing which is not acceptable


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.