You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Andy Olliver <an...@slyfrog.com> on 2002/01/16 19:02:18 UTC

Jdbc2pool

Here are some small changes to the files of jakarta-sandbox-jdbc2pool to
correct the old package name - I can only read from CVS, so here is a zip of
changed files.

I started off using DBCP, but it doesn't seem to support all the SQL I am
using, so perhaps this alternative will help.
If so I will look to create the necessary factory classes to integrate with
Tomcat 4 (unless someone has done this already..)

I believe all classes in this project should now belong to:
org.apache.commons.jdbc2pool
not
org.apache.commons.torque

I am hoping to do some testing on this solution, should I be creating a test
package:
test.apache.commons.jdbc2pool for any usefull test classes?

Andy

Re: Jdbc2pool

Posted by John McNally <jm...@collab.net>.
Thanks for the package correction.  put unit test classes in the same
package, put the source in a parallel tree.

src/java/org/...
src/test/org/...

runtime/blackbox tests i am up for suggestions, but
org.apache.commons.jdbctool.test would be good.

john mcnally 

Andy Olliver wrote:
> 
> Here are some small changes to the files of jakarta-sandbox-jdbc2pool to
> correct the old package name - I can only read from CVS, so here is a zip of
> changed files.
> 
> I started off using DBCP, but it doesn't seem to support all the SQL I am
> using, so perhaps this alternative will help.
> If so I will look to create the necessary factory classes to integrate with
> Tomcat 4 (unless someone has done this already..)
> 
> I believe all classes in this project should now belong to:
> org.apache.commons.jdbc2pool
> not
> org.apache.commons.torque
> 
> I am hoping to do some testing on this solution, should I be creating a test
> package:
> test.apache.commons.jdbc2pool for any usefull test classes?
> 
> Andy
> 
>   ------------------------------------------------------------------------
>                   Name: changes.zip
>    changes.zip    Type: Zip Compressed Data (application/x-zip-compressed)
>               Encoding: base64
> 
>   ------------------------------------------------------------------------
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Jdbc2pool

Posted by Dennis Lundberg <de...@mdh.se>.
If it's the freeTDS driver you're using, I believe that it has built-in 
pooling capabilities. That might explain why you don't get any benefit 
from using another pool on top of that.

/Dennis

Andy Olliver wrote:

> Randy
> 
> I must apologise - I have been trying out 2 different pooling
> implementations - the 'Ewin Connection Pool', and 'DBCP'.
> Ewin always breaks on me when trying to write serialised objects to MS SQL
> Server.
> DBCP does as it should with all the SQL I use, but shows interesting
> characteristics under load with MS SQL - openning and closing 100
> connections from the pool is no faster than trying it without the pool. With
> MySQL I see a factor of x5 difference. (- data below).
> 
> Is there any obvious reason for this that I am missing.
> With the Ewin pool I see great speed improvements for the same test, but run
> into other problems.
> 
> thanks
> Andy Olliver
> 
> ##################
> Test: Open and Close connection x 100:
> 
> MS SQL
> without pool: 1030 ms
> with pool: 1005
> driver = com.inet.tds.TdsDriver
> validation query = null
> 
> MySQL
> without pool: 880 ms
> with pool: 170
> driver = org.git.mm.mysql.Driver
> validation query = null
> similar results also with ODBC bridge.
> ##################
> 
> -----Original Message-----
> From: Randy Speh [mailto:rwspeh@yahoo.com]
> Sent: 16 January 2002 18:57
> To: Jakarta Commons Developers List; andy@slyfrog.com
> Subject: Re: Jdbc2pool
> 
> 
> Just curious,
> What do you mean when you say it doesn't support all
> the SQL you are using?
> 
> Thanks,
> Randy Speh
> 
> 
> --- Andy Olliver <an...@slyfrog.com> wrote:
> 
>>Here are some small changes to the files of
>>jakarta-sandbox-jdbc2pool to
>>correct the old package name - I can only read from
>>CVS, so here is a zip of
>>changed files.
>>
>>I started off using DBCP, but it doesn't seem to
>>support all the SQL I am
>>using, so perhaps this alternative will help.
>>
> 
> 
>>If so I will look to create the necessary factory
>>classes to integrate with
>>Tomcat 4 (unless someone has done this already..)
>>
>>I believe all classes in this project should now
>>belong to:
>>org.apache.commons.jdbc2pool
>>not
>>org.apache.commons.torque
>>
>>I am hoping to do some testing on this solution,
>>should I be creating a test
>>package:
>>test.apache.commons.jdbc2pool for any usefull test
>>classes?
>>
>>Andy
>>
>>
> 
>>ATTACHMENT part 2 application/x-zip-compressed
>>
> name=changes.zip
> 
>>--
>>To unsubscribe, e-mail:
>><ma...@jakarta.apache.org>
>>For additional commands, e-mail:
>>
> <ma...@jakarta.apache.org>
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Send FREE video emails in Yahoo! Mail!
> http://promo.yahoo.com/videomail/
> 
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


DBCP - con.isClosed() takes long time with MS SQL

Posted by Andy Olliver <an...@slyfrog.com>.
I am checking functionality of pooling by running 2 consecutive tests:

open connection
close connection - repeated x1000
DBCP proves to be much faster than with no pooling (as expected).
if I add one more step to each test:
  open connection
  connection.isClosed()
  close connection
the timings change massively - DBCP now takes longer than without pooling.

I would expect times for each test to increase by the same amount, since the
underlying connection object should be handling the con.isClosed call, and
DelegatingConnection seems to pass request straight on.

This change in response times only seems signification when testing against
MS SQL.

Is there a simple explanation for this ?

thanks

Andy

-----Original Message-----
From: Morgan Delagrange [mailto:mdelagra@yahoo.com]
Sent: 16 January 2002 21:39
To: Jakarta Commons Developers List; andy@slyfrog.com
Subject: Re: Jdbc2pool


That's interesting.  Are you working on timings for the jdbc2pool?  If it
gives you good timings for MS SQL, that might indicate a significant
difference between the two.  Or you may just be having difficulties getting
an optimal configuration for DBCP; it still suffers from a high learning
curve with regard to setup.

----- Original Message -----
From: "Andy Olliver" <an...@slyfrog.com>
To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
Sent: Wednesday, January 16, 2002 3:11 PM
Subject: RE: Jdbc2pool


> Randy
>
> I must apologise - I have been trying out 2 different pooling
> implementations - the 'Ewin Connection Pool', and 'DBCP'.
> Ewin always breaks on me when trying to write serialised objects to MS SQL
> Server.
> DBCP does as it should with all the SQL I use, but shows interesting
> characteristics under load with MS SQL - openning and closing 100
> connections from the pool is no faster than trying it without the pool.
With
> MySQL I see a factor of x5 difference. (- data below).
>
> Is there any obvious reason for this that I am missing.
> With the Ewin pool I see great speed improvements for the same test, but
run
> into other problems.
>
> thanks
> Andy Olliver
>
> ##################
> Test: Open and Close connection x 100:
>
> MS SQL
> without pool: 1030 ms
> with pool: 1005
> driver = com.inet.tds.TdsDriver
> validation query = null
>
> MySQL
> without pool: 880 ms
> with pool: 170
> driver = org.git.mm.mysql.Driver
> validation query = null
> similar results also with ODBC bridge.
> ##################
>
> -----Original Message-----
> From: Randy Speh [mailto:rwspeh@yahoo.com]
> Sent: 16 January 2002 18:57
> To: Jakarta Commons Developers List; andy@slyfrog.com
> Subject: Re: Jdbc2pool
>
>
> Just curious,
> What do you mean when you say it doesn't support all
> the SQL you are using?
>
> Thanks,
> Randy Speh
>
>
> --- Andy Olliver <an...@slyfrog.com> wrote:
> >
> > Here are some small changes to the files of
> > jakarta-sandbox-jdbc2pool to
> > correct the old package name - I can only read from
> > CVS, so here is a zip of
> > changed files.
> >
> > I started off using DBCP, but it doesn't seem to
> > support all the SQL I am
> > using, so perhaps this alternative will help.
>
>
> > If so I will look to create the necessary factory
> > classes to integrate with
> > Tomcat 4 (unless someone has done this already..)
> >
> > I believe all classes in this project should now
> > belong to:
> > org.apache.commons.jdbc2pool
> > not
> > org.apache.commons.torque
> >
> > I am hoping to do some testing on this solution,
> > should I be creating a test
> > package:
> > test.apache.commons.jdbc2pool for any usefull test
> > classes?
> >
> > Andy
> >
>
> > ATTACHMENT part 2 application/x-zip-compressed
> name=changes.zip
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
> __________________________________________________
> Do You Yahoo!?
> Send FREE video emails in Yahoo! Mail!
> http://promo.yahoo.com/videomail/
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>



_________________________________________________________

Do You Yahoo!?

Get your free @yahoo.com address at http://mail.yahoo.com




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Jdbc2pool

Posted by Morgan Delagrange <md...@yahoo.com>.
That's interesting.  Are you working on timings for the jdbc2pool?  If it
gives you good timings for MS SQL, that might indicate a significant
difference between the two.  Or you may just be having difficulties getting
an optimal configuration for DBCP; it still suffers from a high learning
curve with regard to setup.

----- Original Message -----
From: "Andy Olliver" <an...@slyfrog.com>
To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
Sent: Wednesday, January 16, 2002 3:11 PM
Subject: RE: Jdbc2pool


> Randy
>
> I must apologise - I have been trying out 2 different pooling
> implementations - the 'Ewin Connection Pool', and 'DBCP'.
> Ewin always breaks on me when trying to write serialised objects to MS SQL
> Server.
> DBCP does as it should with all the SQL I use, but shows interesting
> characteristics under load with MS SQL - openning and closing 100
> connections from the pool is no faster than trying it without the pool.
With
> MySQL I see a factor of x5 difference. (- data below).
>
> Is there any obvious reason for this that I am missing.
> With the Ewin pool I see great speed improvements for the same test, but
run
> into other problems.
>
> thanks
> Andy Olliver
>
> ##################
> Test: Open and Close connection x 100:
>
> MS SQL
> without pool: 1030 ms
> with pool: 1005
> driver = com.inet.tds.TdsDriver
> validation query = null
>
> MySQL
> without pool: 880 ms
> with pool: 170
> driver = org.git.mm.mysql.Driver
> validation query = null
> similar results also with ODBC bridge.
> ##################
>
> -----Original Message-----
> From: Randy Speh [mailto:rwspeh@yahoo.com]
> Sent: 16 January 2002 18:57
> To: Jakarta Commons Developers List; andy@slyfrog.com
> Subject: Re: Jdbc2pool
>
>
> Just curious,
> What do you mean when you say it doesn't support all
> the SQL you are using?
>
> Thanks,
> Randy Speh
>
>
> --- Andy Olliver <an...@slyfrog.com> wrote:
> >
> > Here are some small changes to the files of
> > jakarta-sandbox-jdbc2pool to
> > correct the old package name - I can only read from
> > CVS, so here is a zip of
> > changed files.
> >
> > I started off using DBCP, but it doesn't seem to
> > support all the SQL I am
> > using, so perhaps this alternative will help.
>
>
> > If so I will look to create the necessary factory
> > classes to integrate with
> > Tomcat 4 (unless someone has done this already..)
> >
> > I believe all classes in this project should now
> > belong to:
> > org.apache.commons.jdbc2pool
> > not
> > org.apache.commons.torque
> >
> > I am hoping to do some testing on this solution,
> > should I be creating a test
> > package:
> > test.apache.commons.jdbc2pool for any usefull test
> > classes?
> >
> > Andy
> >
>
> > ATTACHMENT part 2 application/x-zip-compressed
> name=changes.zip
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
> __________________________________________________
> Do You Yahoo!?
> Send FREE video emails in Yahoo! Mail!
> http://promo.yahoo.com/videomail/
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Jdbc2pool

Posted by Randy Speh <rw...@yahoo.com>.
I must say that I have not used DBCP extensively. 
I've merely been evaulating its features.

Randy

--- Andy Olliver <an...@slyfrog.com> wrote:
> Randy
> 
> I must apologise - I have been trying out 2
> different pooling
> implementations - the 'Ewin Connection Pool', and
> 'DBCP'.
> Ewin always breaks on me when trying to write
> serialised objects to MS SQL
> Server.
> DBCP does as it should with all the SQL I use, but
> shows interesting
> characteristics under load with MS SQL - openning
> and closing 100
> connections from the pool is no faster than trying
> it without the pool. With
> MySQL I see a factor of x5 difference. (- data
> below).
> 
> Is there any obvious reason for this that I am
> missing.
> With the Ewin pool I see great speed improvements
> for the same test, but run
> into other problems.
> 
> thanks
> Andy Olliver
> 
> ##################
> Test: Open and Close connection x 100:
> 
> MS SQL
> without pool: 1030 ms
> with pool: 1005
> driver = com.inet.tds.TdsDriver
> validation query = null
> 
> MySQL
> without pool: 880 ms
> with pool: 170
> driver = org.git.mm.mysql.Driver
> validation query = null
> similar results also with ODBC bridge.
> ##################
> 
> -----Original Message-----
> From: Randy Speh [mailto:rwspeh@yahoo.com]
> Sent: 16 January 2002 18:57
> To: Jakarta Commons Developers List;
> andy@slyfrog.com
> Subject: Re: Jdbc2pool
> 
> 
> Just curious,
> What do you mean when you say it doesn't support all
> the SQL you are using?
> 
> Thanks,
> Randy Speh
> 
> 
> --- Andy Olliver <an...@slyfrog.com> wrote:
> >
> > Here are some small changes to the files of
> > jakarta-sandbox-jdbc2pool to
> > correct the old package name - I can only read
> from
> > CVS, so here is a zip of
> > changed files.
> >
> > I started off using DBCP, but it doesn't seem to
> > support all the SQL I am
> > using, so perhaps this alternative will help.
> 
> 
> > If so I will look to create the necessary factory
> > classes to integrate with
> > Tomcat 4 (unless someone has done this already..)
> >
> > I believe all classes in this project should now
> > belong to:
> > org.apache.commons.jdbc2pool
> > not
> > org.apache.commons.torque
> >
> > I am hoping to do some testing on this solution,
> > should I be creating a test
> > package:
> > test.apache.commons.jdbc2pool for any usefull test
> > classes?
> >
> > Andy
> >
> 
> > ATTACHMENT part 2 application/x-zip-compressed
> name=changes.zip
> > --
> > To unsubscribe, e-mail:
> >
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Send FREE video emails in Yahoo! Mail!
> http://promo.yahoo.com/videomail/
> 
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Jdbc2pool

Posted by Andy Olliver <an...@slyfrog.com>.
Randy

I must apologise - I have been trying out 2 different pooling
implementations - the 'Ewin Connection Pool', and 'DBCP'.
Ewin always breaks on me when trying to write serialised objects to MS SQL
Server.
DBCP does as it should with all the SQL I use, but shows interesting
characteristics under load with MS SQL - openning and closing 100
connections from the pool is no faster than trying it without the pool. With
MySQL I see a factor of x5 difference. (- data below).

Is there any obvious reason for this that I am missing.
With the Ewin pool I see great speed improvements for the same test, but run
into other problems.

thanks
Andy Olliver

##################
Test: Open and Close connection x 100:

MS SQL
without pool: 1030 ms
with pool: 1005
driver = com.inet.tds.TdsDriver
validation query = null

MySQL
without pool: 880 ms
with pool: 170
driver = org.git.mm.mysql.Driver
validation query = null
similar results also with ODBC bridge.
##################

-----Original Message-----
From: Randy Speh [mailto:rwspeh@yahoo.com]
Sent: 16 January 2002 18:57
To: Jakarta Commons Developers List; andy@slyfrog.com
Subject: Re: Jdbc2pool


Just curious,
What do you mean when you say it doesn't support all
the SQL you are using?

Thanks,
Randy Speh


--- Andy Olliver <an...@slyfrog.com> wrote:
>
> Here are some small changes to the files of
> jakarta-sandbox-jdbc2pool to
> correct the old package name - I can only read from
> CVS, so here is a zip of
> changed files.
>
> I started off using DBCP, but it doesn't seem to
> support all the SQL I am
> using, so perhaps this alternative will help.


> If so I will look to create the necessary factory
> classes to integrate with
> Tomcat 4 (unless someone has done this already..)
>
> I believe all classes in this project should now
> belong to:
> org.apache.commons.jdbc2pool
> not
> org.apache.commons.torque
>
> I am hoping to do some testing on this solution,
> should I be creating a test
> package:
> test.apache.commons.jdbc2pool for any usefull test
> classes?
>
> Andy
>

> ATTACHMENT part 2 application/x-zip-compressed
name=changes.zip
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>


__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Jdbc2pool

Posted by Randy Speh <rw...@yahoo.com>.
Just curious,
What do you mean when you say it doesn't support all
the SQL you are using?

Thanks,
Randy Speh


--- Andy Olliver <an...@slyfrog.com> wrote:
> 
> Here are some small changes to the files of
> jakarta-sandbox-jdbc2pool to
> correct the old package name - I can only read from
> CVS, so here is a zip of
> changed files.
> 
> I started off using DBCP, but it doesn't seem to
> support all the SQL I am
> using, so perhaps this alternative will help.


> If so I will look to create the necessary factory
> classes to integrate with
> Tomcat 4 (unless someone has done this already..)
> 
> I believe all classes in this project should now
> belong to:
> org.apache.commons.jdbc2pool
> not
> org.apache.commons.torque
> 
> I am hoping to do some testing on this solution,
> should I be creating a test
> package:
> test.apache.commons.jdbc2pool for any usefull test
> classes?
> 
> Andy
> 

> ATTACHMENT part 2 application/x-zip-compressed
name=changes.zip
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>


__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>