----- Original Message -----
From: Heinz Wehner <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 02, 1999 5:34 PM
Subject: Re: Multiple users accessing a servlet


> Ramana,
>
> >> This is the story for ODBC driver manager ver3.0 or later. I do not
know
> the details for JDBC and as such since it seems to depend on the database
> engine rather than the connection methodology i really doubt if we can use
> connection pooling to connect to MS-Access even with JDBC. Let me know the
> sites or links to any articles that have used connnection pooling with
> MS-Access and JDBC. <<
>
> Take the following code snippet as an example:
>
> static Connection[] con = new Connection[ 2 ];
> con[ 0 ] = DriverManager.getConnection( source );
> con[ 1 ] = DriverManager.getConnection( source );
>
> Assume this is executed in a servlet's init method. If the servlet's
> service method does NOT explicitly close a connection, every servlet
> service thread spawned by a client request can use any available free
> connection. This means you can have JDBC connection pooling even with Jet
> engine based databases because connect/disconnect is handled by the
initial
> servlet thread (rather than by different service threads). The connections
> are closed as the connnection objects get garbage collected. This happens
> when the servlet engine unloads the servlet.
>
> I still cannot see why not using the internal ODBC connection pooling
> capability should be such a severe restriction. It does NOT seem to
prevent
> from JDBC (and external ODBC) connection pooling at all.
>
> Anybody out there who can shed some more light on this issue?
>
> Heinz Wehner
> (Karlsruhe, Germany)
>
Hi Heinz,

Connection pooling has to be managed by you in some form or other. If you
are using a middle
db connector such as dbAnywhere from Symantec then connection pooling is
dealt with by it,
otherwise you would need to implement a thread safe connection pool class or
classes.

Pooling connections at the servlet is not influenced by any other forms of
connection pooling
implemented else where. All you are doing is using 2 pools, one under your
own control and the
other transparently.

In otherwords, there is are restriction placed on you other than the maximum
number of connections
that you can have to your database server, regardless of how you do things.

Andy Bailey

[EMAIL PROTECTED]

___________________________________________________________________________
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