Michael,
Thanks for the reply. I did not modify the test configuration except for adding
my db2 profile, so I suppose I am not using a connection pool. I run the test
like this:
mvn -f openjpa-persistence-jdbc/pom.xml test -Ptest-custom2,test-db2-milosz
and in ~/.m2/settings.xml I have:
<profile>
<id>test-db2-milosz</id>
<properties>
<test-custom>true</test-custom>
<openjpa.custom.driverjar1>/alt/jdbc/db2jcc.jar</openjpa.custom.driverjar1>
<openjpa.custom.driverjar2>/alt/jdbc/db2jcc_license_cu.jar</openjpa.custom.driverjar2>
<openjpa.custom.driverclass>com.ibm.db2.jcc.DB2Driver</openjpa.custom.driverclass>
<openjpa.custom.url>jdbc:db2://localhost:50000/oj</openjpa.custom.url>
<!--
<openjpa.custom.url>jdbc:db2://localhost:50000/oj:traceDirectory=/tmp/db2log;traceLevel=3;</openjpa.custom.url>
-->
<openjpa.custom.username>*</openjpa.custom.username>
<openjpa.custom.password>*</openjpa.custom.password>
</properties>
As for reusing/creating the tables I am not sure. I think I rely on the default
behviour. Is there an option for that?
I have recently uncommented the commented line above in settings.xml and run a
single test (TestQueryPagination). This immediately produced almost 80 files in
diagnostic directory and if I understand them correctly, this corresponds to
almost 80 connections. This suggests me that I should try a connection pool.
Regards,
Milosz
> Hi Milosz
>
> Are you using a connection pool (commons dbcp) when you run the tests? Also
> are you using existing tables or creating new ones with each run?
>
>
> On Wed, Sep 24, 2008 at 12:43 PM, Miłosz Tylenda wrote:
>
> > Hello!
> >
> > When I run the OpenJPA test suite on DB2, it takes much more time to
> > complete than with other databases. The DB2 process hogs the CPU during the
> > test. A quite default installation of DB2 9.1 Express-C runs on the same
> > Linux (2.6.18-1.2798.fc6) laptop as OpenJPA 1.3.0-SNAPSHOT. Does anybody
> > have a clue what is the reason? Can it be related to the number of open
> > connections or schema generation?
> >
> > A log snippet follows.
> >
> > Running org.apache.openjpa.persistence.jdbc.meta.TestEJBCustomMapping
> > 3 TestConv INFO [main] openjpa.Runtime - Starting OpenJPA
> > 1.3.0-SNAPSHOT
> > 3499 TestConv INFO [main] openjpa.jdbc.JDBC - Using dictionary class
> > "org.apache.openjpa.jdbc.sql.DB2Dictionary" (DB2/LIN
> > UX SQL09010 ,IBM DB2 JDBC Universal Driver Architecture 3.1.57).
> > 3917 TestConv WARN [main] openjpa.MetaData - OpenJPA cannot map field "
> > org.apache.openjpa.persistence.jdbc.common.apps.Co
> > nstantJoinPC4.manyToMany" efficiently. It is of an unsupported type. The
> > field value will be serialized to a BLOB by default
> > .
> > 0 TestConv INFO [main] openjpa.Runtime - Starting OpenJPA
> > 1.3.0-SNAPSHOT
> > 2800 TestConv INFO [main] openjpa.jdbc.JDBC - Using dictionary class
> > "org.apache.openjpa.jdbc.sql.DB2Dictionary" (DB2/LIN
> > UX SQL09010 ,IBM DB2 JDBC Universal Driver Architecture 3.1.57).
> > 2844 TestConv WARN [main] openjpa.MetaData - OpenJPA cannot map field "
> > org.apache.openjpa.persistence.jdbc.common.apps.Co
> > nstantJoinPC4.manyToMany" efficiently. It is of an unsupported type. The
> > field value will be serialized to a BLOB by default
> > .
> > Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 46.161 sec
> >
> > Regards,
> > Milosz
> >
> >
>