openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albert Lee (JIRA)" <>
Subject [jira] Commented: (OPENJPA-903) org.apache.openjpa.persistence.exception.TestException hangs when run using PostgreSQL 8.3 database
Date Sun, 22 Feb 2009 23:37:02 GMT


Albert Lee commented on OPENJPA-903:


>From posting in

It looks like PostgreSQL does not support query timeout. If this is true, the PostgresDictionary
needs to update the 
        supportsQueryTimeout = false;
in its constructor to reflect this behavior. (like the InformixDictionary)

The test case is trying to validate the scenario that em2 should be blocked and time out on
flush and hence the OptimisticLockException. Of course, replace the flush with commit will
cause the commit to commit and therefore em2.flush will NOT block and the UPDATE statement
with the same version update will result with the expected OptimisticLockException but that
is not the intent of the test case.

I ran TestException against DB2 on the trunk release and it works with a timeout and the expected

I suggest :
1) to validate the Postgre's query timeout behavior first and update PostgresDictionary as
2) to figure out what databases are and are not working/hanging and correlated the queryTimeout
support for each of the db.
3) if the condition is the test case hangs due to no timeout on executing the UPDATE, then
test case can be changed to conditionally run if the db support querytimeout by testing this
dictionary capability.

Hope this help.
Albert Lee

> org.apache.openjpa.persistence.exception.TestException hangs when run using PostgreSQL
8.3 database 
> ----------------------------------------------------------------------------------------------------
>                 Key: OPENJPA-903
>                 URL:
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: jdbc
>    Affects Versions: 2.0.0
>         Environment: Windows 2003 Server, maven 2.0.9, Java, 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.

View raw message