Hi,

I have a question about DB connections.  My testing doesn't match what I
read in a couple books, so I am confused...

Background/Environment:
I am using Oracle 8.0.4 and the Oracle thin driver.  My servlet is using
the SingleThread implementation and I create a connection to the DB in
the Init method of the servlet.  The servlet engine is JRun 2.3.

Connection con; //Declared within the servlet class before the init
method

//In init
String url = "jdbc:oracle:thin:@ip:port:dbname";
       con = DriverManager.getConnection(url, "db","pw");

After I run the servlet the first time, Oracle reports 7
connections to my Servlet!  I only create one connection in the Init
block.  My
servlet does declare two different result sets and two prepared
statements, all using the "con" connection object.  They are not
explicitly closed.

If I run the servlet several more times, there are still 7 connections,
so it appears that they are being reused.

Question:
How did I get more than 1 connection to the DB?

Thank you for your time and assistance,
John

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to