Hi,
has enyone of you recently measured the performance of the DBCP
Connection Pool? I compared

<snip>
long start = System.currentTimeMillis();
Class.forName("ca.edbc.jdbc.EdbcDriver");
Connection dbcon = DriverManager.getConnection(loginUrl, loginUser, loginPa$
long diff = System.currentTimeMillis() - start;
System.out.println("creating connection without pool took: " + diff + " mil$
</snip>

with 

<snip>
long start = System.currentTimeMillis();
Connection dbcon = ds.getConnection( );
long diff = System.currentTimeMillis() - start;
System.out.println("creating connection with pool took: " + diff + " milise$
</snip>

And got surprisingly results like this:

creating connection without pool took: 465 miliseconds
creating connection with pool took: 585 miliseconds

In my tests the connection pool is always slower, so what did I do wrong?
I guess this Parameter is responsible for holding active Connections in
the Pool:
<parameter>
      <name>initialSize</name>
      <value>20</value>
</parameter>
So there shold be active Connections before the getConnection( ) is
called .. Any ideas?
Regards, Henrik

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to