tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mihai Gheorghiu" <tane...@earthlink.net>
Subject Re: JDBC Connection Pool Theory ??
Date Mon, 24 Sep 2001 15:31:27 GMT
Thank you very much.
Aside from lower speed (open a db connection every time a servlet requires
it), are there any other inconveniences or risks if not using a connection
pool?

-----Original Message-----
From: C. Schlegelmilch <c_schlegelmilch@yahoo.com>
To: tomcat-user@jakarta.apache.org <tomcat-user@jakarta.apache.org>
Date: Saturday, September 22, 2001 2:20 AM
Subject: Re: JDBC Connection Pool Theory ??


>A pool of a fixed number of connections is generally
>initialized right at startup of the web application.
>>From then on in, when a user of a wep app requires a
>connection, it pulls it away form the pool and returns
>it when its done.  Because all users of a web app
>effectively share all of the connections of a pool,
>there is never one connection reserved for one user.
>Its generally a better use of resources not to.
>
>But now that I think of it, there is nothing stopping
>you from assigning a user to a connection in a pool.
>That would require some interesting design work to
>make it slick, but its possible.
>
>While this may not solve your current issue, give this
>a try:
>
>http://www.webdevelopersjournal.com/columns/connection_pool.html
>
>The code looks very similar to some of the class
>solutions.
>
> --- Mihai Gheorghiu <tanethq@earthlink.net> wrote: >
>I've been looking at some pooling examples and I
>> must admit I'm still not
>> clear whether it is possible to have db connections
>> with the username and
>> password of the web/java user, or the database
>> "sees" n connections with the
>> same username and password  generated by the pool
>> manager. I want the
>> web/java usernane and pwd to be passed to the db for
>> logging/signing
>> purposes. Can anyone please point me to some
>> relevant
>> documentation/tutorial?
>> Thank you all.
>>
>> -----Original Message-----
>> From: C. Schlegelmilch <c_schlegelmilch@yahoo.com>
>> To: tomcat-user@jakarta.apache.org
>> <tomcat-user@jakarta.apache.org>
>> Date: Friday, September 21, 2001 12:19 PM
>> Subject: Re: JDBC Connection Pool Theory ??
>>
>>
>> >We had our web development class develop their own
>> >software for connection pooling.  These are
>> extremely
>> >simple soluitons but they work quite well for the
>> >small to medium traffic they are likely to get.
>> >
>> >They are using "Professional Java Server
>> Programming"
>> >as a reference and it has some interesting sections
>> on
>> >Connection Pooling.  This is good if you're only
>> >running a simple application.  It was also noted
>> that
>> >this resource did not address any synchronization
>> >issues which is very important (the last thing you
>> >want is two seperate threads getting a reference to
>> >the next free connection at the same time).  This
>> is
>> >really the only big gottcha that we found in a
>> simple
>> >implementation.
>> >
>> > --- Jon Shoberg <jshoberg@cbd.net> wrote: >
>> >> Can anyone suggest or point to readings on JDBC
>> >> connection pool theory?
>> >> Something that covers how a pool is implemented,
>> >> best case / worst case
>> >> scenarios, tips and traps.
>> >>
>> >> My next web application is looking to be very
>> >> database (mysql) intensive.
>> >> I would like a pooling mechanism that is VERY
>> simple
>> >> to use, VERY light, low
>> >> overhead, and portable.  Having looked at
>> packages
>> >> such as poolman, I
>> >> decided I need to learn a bit more about JDBC and
>> >> pooling in general.  Any
>> >> thoughts ?
>> >>
>> >> Jon
>> >>
>> >
>>
>>____________________________________________________________
>> >Do You Yahoo!?
>> >Get your free @yahoo.co.uk address at
>> http://mail.yahoo.co.uk
>> >or your free @yahoo.ie address at
>> http://mail.yahoo.ie
>>
>
>____________________________________________________________
>Do You Yahoo!?
>Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
>or your free @yahoo.ie address at http://mail.yahoo.ie


Mime
View raw message