File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Connection Pooling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Connection Pooling" Watch "Connection Pooling" New topic

Connection Pooling


Joined: Dec 17, 2001
Posts: 1
I am using a Connection Pool that I instantiate with <jsp:useBean id="email" scope="application" class="connectionpool.ConnectionPool" />. My question is how would I use this from another servlet?
[ Edited by Dave to fix the < ]
[This message has been edited by David O'Meara (edited December 17, 2001).]
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at .
We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in again with a new name which meets the requirements.
Stanley Tan
Ranch Hand

Joined: May 17, 2001
Posts: 243
Someone please correct me if I'm wrong, but isn't connection pooling managed not by the programmer but by the container?
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
It depends on the container/server. I know websphere already has a connection pool manager. But say you are using Tomcat, then you have to code and manage your own connection pooling.
SCJP for the Java� 2 Platform

So much trouble in the world -- Bob Marley
C Balajee

Joined: Oct 18, 2000
Posts: 25
Hi Bosun,
I also aggree that closing the conection will in turn close the statement and the resultset.
By "closing" you must mean that that the particular statement/resultset is not available for further use..
My query is what will happen if a reference to the closed resultset still exists in the memory..??
Will the connection pool manager of WebSphere release the connection for further use??
C Balajee
C Balajee

Joined: Oct 18, 2000
Posts: 25
sorry Guys,
I posted the wrong reply in the wrong thread...
C Balajee
C Balajee

Joined: Oct 18, 2000
Posts: 25
This is my correct post..
You can try the following code in other JSP's or servlets..
this will return an object which you need to cast to your connection pool.
the variable "session" is readily available with JSP Pages..
But in servlet you need to call
Hope this helps...
C Balajee
sorry for the inconvinience..
Josh Batchelor

Joined: Dec 18, 2001
Posts: 9
I agree. Here's the link:
subject: Connection Pooling
It's not a secret anymore!