db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Watzek <mwa.t...@spree.de>
Subject Re: connection pool settings for c3p0
Date Mon, 19 Sep 2005 13:14:31 GMT
Hi Karan,

> Hi Michael,
> I have noticed one thing in the tests. The BatchTestRunner creates a new object for each
TestCase and then calls the test() method. Since each one of them inherits the pmf instance
variable, dont you think that with each test we are trying to get a new pmf and that initiates
creation of a new pool of connections. This might be the reason connection pooling is slower
than running tests without connection pooling. That 10% of overhead when we run tests with
connection pooling, is in my opinion the time taken to create that pool (thats what it looks
like when i looked at the JPOX RDBMS log earlier).
Right! Each test method calls the JDO implementation returning a pmf 
instance. Finally, the test method calls pmf.close() and nullifies the 
variable holding the pmf instance.

Provided, that each getPMF() call creates a new pmf instance, then we do 
not benefit from connetion pooling because the pool is bound to a pmf 
instance (as you mentioned above). That's what we see when we run TCK20 
with JPOX.

However, a JDO implementation may return the same pmf instance if you 
pass the same properties to getPMF in subsequent calls. Such 
implementations would benefit from connection pooling when they are 
called by TCK20.


> I might be wrong, because i havent had the time to understand the JDO_Test class fully.
If I am wrong, then I think it might be worth a try to increase the connection pool size a
little bit, just to see if it speeds up the tests.
> I will try it and let you know. 
> Thanks for the info on c3p0 properties.
> Karan Singh
> Senior Technical Consultant
> Learnquest
> -----Original Message-----
> From: Michael Watzek [mailto:mwa.tech@spree.de]
> Sent: Mon 9/19/2005 8:26 AM
> To: jdo-dev@db.apache.org
> Subject: Re: connection pool settings for c3p0
> Hi Karan,
> up to now there is no file "c3p0.properties". Thus, we run C3P0 using 
> the default configuration. Do you think we can benefit from changing the 
> default? The right place for such a file would be under test/conf.
> Regards,
> Michael
>>Where are we doing connection pool settings for c3p0? I couldnt find the 
>>c3p0.properties file anywhere

Michael Watzek                  Tech@Spree Engineering GmbH
mailto:mwa.tech@spree.de        Buelowstr. 66
Tel.:  ++49/30/235 520 36       10783 Berlin - Germany
Fax.:  ++49/30/217 520 12       http://www.spree.de/

View raw message