[
https://issues.apache.org/jira/browse/OPENJPA-903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12676499#action_12676499
]
Tim McConnell commented on OPENJPA-903:
---------------------------------------
Ok, I finally see what's happening here. For this testcase to work across
multiple databases, two things have to be configured correctly for each
database. They are:
1. A locking timeout has to be available and set for each database (or database
server). For example, the default setting for Derby is
derby.locks.waitTimeout=60 (i.e., 60 seconds), which is at the server level.
For DB2, it can be set at a database level, but the default is LOCKTIMEOUT=-1,
which disables it. Likewise for PostgreSQL the setting is at a server, not
database, granularity, etc...
2. The sql-error-state-codes.xml file has to be properly populated with the
appropriate lock and optimistic key values that correlate the
database-dependent SQL codes and states to an optimistic lock.
I'll provide another patch tomorrow. Thanks
> org.apache.openjpa.persistence.exception.TestException hangs when run using
> PostgreSQL 8.3 database
> ----------------------------------------------------------------------------------------------------
>
> Key: OPENJPA-903
> URL: https://issues.apache.org/jira/browse/OPENJPA-903
> Project: OpenJPA
> Issue Type: Sub-task
> Components: jdbc
> Affects Versions: 2.0.0
> Environment: Windows 2003 Server, maven 2.0.9, Java 1.5.0.15,
> PostgreSQL 8.3.5
> Reporter: Tim McConnell
> Assignee: Tim McConnell
> Attachments: OPENJPA-903.patch
>
>
> Seems to be hanging in the testThrowsOptimisticException() testcase -- see
> below:
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running org.apache.openjpa.persistence.exception.TestException
> 31 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
> 484 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class
> "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 8.3.5
> ,PostgreSQL Native Driver PostgreSQL 8.3 JDBC3 with SSL (build 603)).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.