openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Dick" <michael.d.d...@gmail.com>
Subject Re: Test suite slow on DB2
Date Wed, 24 Sep 2008 21:33:35 GMT
Hi Milosz,

Actually you are using commons-dbcp as a connection pool. If you use the
built in test-custom2 profile it will automatically use commons-dbcp.

WRT creating the tables, if you're using the default settings we'll create
the tables the first time you run the tests. Subsequent executions will not
recreate the tables. Derby is an exception to this rule, the Derby database
is found in the target directory. Maven removes the target directory in the
'clean' goal so the Derby database may be regenerated from scratch each time
you run the tests.

I'll kick off an entire test run with DB2 and see if I hit the same problem.
I ran some of the tests but I didn't see times quite as bad as the ones you
reported.

-mike



On Wed, Sep 24, 2008 at 2:07 PM, Miłosz Tylenda <mtylenda@o2.pl> wrote:

> 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
> > >
> > >
> >
>
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message