Hi,
I'm not sure how to continue on this issue. I see three options:
1) Check in the changes though they do not have the expected effect.
2) Leave the code unchanged and close the bug.
3) Check in the changes and change the coding pattern for TCK tests, so
that all tests share the same PMF instance.
I vote for option 1). Below I listed the changes for option 1):
1) Additional dependencies to JPOX plugins, DBCP, C3P0, commons-pool,
commons-collections.
2) Change in propject.properties, maven.xml to extend the TCK classpath
3) Add a JPOX property to PMF properties
I have added a patch file containing these changes. The connection pool
in this patch is set to DBCP. You can switch to C3P0 if you set JPOX
property "org.jpox.connectionPoolingType" to "C3P0".
In order to run you need to download the following jars and store them
in your local maven repository:
1) jpox-dbcp-1.1.0-beta-3.jar to jpox/jars
2) jpox-c3p0-1.1.0-beta-3.jar to jpox/jars
3) commons-dbcp-1.2.1.jar to commons-dbcp/jars
4) c3p0-0.8.5.2.jar to c3p0/jars
5) commons-pool-1.2.jar to commons-pool/jars
6) commons-collections-3.1.jar to commons-collections/jars
Regards,
Michael
I'm just curious if two created PMF instances share the same connection
pool?
No. You create a PMF and it gets its own (DBCP/C3P0/...) DataSource,
and hence it gets its own connection pool (unless DBCP/C3P0 are
intelligent enough to realise when 2 PMF connection URLs and login
credentials are the same and so share with the already existing data
source ...)
This is very likely the reason why I do not see performance improvement
in TCK runs: Many tests execute only 1 transaction and each test uses a
separate PMF instance.
Thanks,
Michael
--
-------------------------------------------------------------------
Michael Watzek [EMAIL PROTECTED] Engineering GmbH
mailto:[EMAIL PROTECTED] Buelowstr. 66
Tel.: ++49/30/235 520 36 10783 Berlin - Germany
Fax.: ++49/30/217 520 12 http://www.spree.de/
-------------------------------------------------------------------
Index: test/conf/jdori.properties
===================================================================
--- test/conf/jdori.properties (revision 179762)
+++ test/conf/jdori.properties (working copy)
@@ -20,3 +20,6 @@
org.jpox.autoCreateConstraints=false
org.jpox.autoCreateColumns=false
org.jpox.rdbms.CheckExistTablesOrViews=false
+
+org.jpox.connectionPoolingType=DBCP
+#org.jpox.connectionPoolingType=C3P0
Index: project.properties
===================================================================
--- project.properties (revision 179762)
+++ project.properties (working copy)
@@ -63,6 +63,13 @@
core20.jarfile = ${pom.getDependencyPath('apache-jdo:jdo2-core')}
enhancer20.jarfile = ${pom.getDependencyPath('apache-jdo:jdo2-enhancer')}
xmlparser =
+# connection pooling dependencies
+jpox.dbcp.jarfile = ${pom.getDependencyPath('jpox:jpox-dbcp')}
+jpox.c3p0.jarfile = ${pom.getDependencyPath('jpox:jpox-c3p0')}
+c3p0.jarfile = ${pom.getDependencyPath('c3p0')}
+dbcp.jarfile = ${pom.getDependencyPath('commons-dbcp')}
+pool.jarfile = ${pom.getDependencyPath('commons-pool')}
+collections.jarfile = ${pom.getDependencyPath('commons-collections')}
# JDORI enhancer
jdo.enhanced.dir = ${maven.build.dir}/enhanced/jdori
Index: maven.xml
===================================================================
--- maven.xml (revision 179762)
+++ maven.xml (working copy)
@@ -418,6 +418,13 @@
<pathelement location="${derby.jarfile}" />
<pathelement location="${core20.jarfile}" />
<pathelement location="${enhancer20.jarfile}" />
+ <!-- Jar files for connection pooling -->
+ <pathelement location="${jpox.dbcp.jarfile}" />
+ <pathelement location="${jpox.c3p0.jarfile}" />
+ <pathelement location="${c3p0.jarfile}"/>
+ <pathelement location="${dbcp.jarfile}"/>
+ <pathelement location="${pool.jarfile}"/>
+ <pathelement location="${collections.jarfile}"/>
</path>
<!-- ==== -->
Index: project.xml
===================================================================
--- project.xml (revision 179762)
+++ project.xml (working copy)
@@ -104,6 +104,39 @@
<artifactId>jdo2-core</artifactId>
<version>SNAPSHOT</version>
</dependency>
+ <!-- dependencies for connection pooling -->
+ <dependency>
+ <groupId>jpox</groupId>
+ <artifactId>jpox-c3p0</artifactId>
+ <version>SNAPSHOT</version>
+ <url>http://www.jpox.org/docs/download.html</url>
+ </dependency>
+ <dependency>
+ <groupId>jpox</groupId>
+ <artifactId>jpox-dbcp</artifactId>
+ <version>SNAPSHOT</version>
+ <url>http://www.jpox.org/docs/download.html</url>
+ </dependency>
+ <dependency>
+ <groupId>c3p0</groupId>
+ <artifactId>c3p0</artifactId>
+ <version>0.8.5.2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-dbcp</groupId>
+ <artifactId>commons-dbcp</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-pool</groupId>
+ <artifactId>commons-pool</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.1</version>
+ </dependency>
</dependencies>
<!-- =================== -->
<!-- Build Specification -->