[opencms-dev] connection pooling
c.brunschwiler at bluewin.ch
Fri May 9 17:30:02 CEST 2003
I adapted the opencms db pooling for a little project.
Mainly the dbpool holds some connections.
The min and max amount of connections is configurable in
the properties. Also the maximum age and a timeout is configurable.
What you did until yet is getting the driver, setting up a connection
and executing some statements.
In bigger environments you'll run in troubles. maybe if you try to open
more connections than the db can handle.
Working with the pool:
Get the connection from the dbpool. something like..
Connection con = DBPool.connect();
Do your stuff you did until yet. something like...
PreparedStatement ps = con.xy ...
At the end of your db request free the connection. it's like...
If you don't free the connection, the pool will kill the connection
and create a new one. !!! Do not force this behavior. It's just
implemented to take care about lost connections and quickly hackers.
If you'd try to get a connection from the pool and the maximum amount
of connections is allready reached, i think the statement will run
into a waiting loop.
From: opencms-dev-admin at opencms.org
[mailto:opencms-dev-admin at opencms.org]On Behalf Of Herbig, Tobias
Sent: Friday, May 09, 2003 16:49
To: opencms-dev at opencms.org
Subject: [opencms-dev] connection pooling
my name is tobias, i'm new at openCMS and currently working to get a overview.
can somebody post me, where to find documentation on how to use the database connection pooling?
(please excuse my poor english ; - ( )
Gesellschaft fuer Informationstechnologie mbH
Tel. 089/ 579 52-225
Fax. 089/ 579 52-399
E-Mail:tobias.herbig at pentasys.de
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
More information about the opencms-dev