This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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).]
"Josh_Batchelor", The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . 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. Thanks. Dave
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. ------------------ Bosun SCJP for the Java� 2 Platform
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
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?? regards C Balajee
Joined: Oct 18, 2000
sorry Guys, I posted the wrong reply in the wrong thread... regards C Balajee
Joined: Oct 18, 2000
This is my correct post.. You can try the following code in other JSP's or servlets.. session.getAttribute("email"); 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 requestObject.getSession(true/false) Hope this helps... regards C Balajee sorry for the inconvinience..