I am not a great source on Database usage with servlets but While working on
a simiar problem about 4 months ago I found that the driver I was unsing to
connect to the database was creating the "extra" connections.

I was told that because the driver only had a liscence for 30 concurrent
connections it was checking this every time is was used.

This info was backed up by our DB admin who said the querys in question were
a count of connection from that driver..

-Mark

----- Original Message -----
From: John Larson <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 12, 1999 4:25 PM
Subject: JDBC Connection Question


> 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; file://Declared within the servlet class before the init
> method
>
> file://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
>

___________________________________________________________________________
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