/commons/dbcp/BasicDataSource.html#addConnectionProperty(java.lang.String,%20java.lang.String)
If you are creating the pool yourself you can do:
DriverConnectionFactory driverConnectionFactory =
new DriverConnectionFactory(driver, url, connectionProperties);
Regards
Dirk
Arjen van der Weijden
Hi Dirk,
Can you tell me where I can do the configuring? I'm not using just plain
java objects so no tomcat and struts or other frameworks.
thanks,
Arjen
Never mind,
I finally got it working.
cheers,
Arjen
I've been trying hard to get the example files (commons dbcp site) running.
After setting my jar-lib extensions (sax2.jar and the like) and running the
simple example file:
(Jocl.java is like the poolingDriverExample.java)
java
I've been trying hard to get the example files (commons dbcp site) running.
After setting my jar-lib extensions and running the simple example file:
(Jocl.java is like the poolingDriverExample.java)
java
-Djdbc.drivers=com.mysql.jdbc.Driver:org.apache.commons.dbcp.PoolingDriver
Jocl -cp .
.
In your example, how do you create/initialize the connectionPool variable?
-- Dirk
Arjen van der Weijden wrote:
Hi,
Only if I close the connection after each SELECT the program runs fine,
but
the thing is: I want to have more than one connection open at a time. Do
you know what could be the case
create/initialize the connectionPool variable?
-- Dirk
Arjen van der Weijden wrote:
Hi,
Only if I close the connection after each SELECT the program runs fine,
but
the thing is: I want to have more than one connection open at a time. Do
you know what could be the case?
gr.
Arjen
a trivial problem.
The close() methods aren't called inside your inner for loop.
So for each 3 connections created in the for j loop only 1 is closed.
The order of closing rset,stmt,conn is correct.
-- Dirk
Arjen van der Weijden wrote:
Hi folks,
Just started out examining DBCP, so I'm
close the ResultSet,
Statement and Connection.
The Statementshould be closed before the ResultSet followed by
Connection. I had a similar problem and this fix worked for me.
Anshul
- Original Message -
From: Arjen van der Weijden [EMAIL PROTECTED]
To: commons-user@jakarta.apache.org
Sent
Arjen van der
Weijden To: Jakarta Commons
Users List commons-user@jakarta.apache.org
Hi folks,
Just started out examining DBCP, so I'm completely new to the subject.
I adapted the example given by Dirk V. (given below). I put some stuff in a
for loop.
The PROBLEM is that after a few loops the program seems to hang (less than
10 connections).
Can anybody help me on this, it must
10 matches
Mail list logo