openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Norman Maurer (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-1656) openjpa.LockTimeout not work with H2
Date Mon, 10 May 2010 12:16:47 GMT
openjpa.LockTimeout not work with H2
------------------------------------

                 Key: OPENJPA-1656
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1656
             Project: OpenJPA
          Issue Type: Bug
    Affects Versions: 2.0.0
         Environment: openjpa 2.0, h2 1.2.134
            Reporter: Norman Maurer


When using openjpa.LockTimeout with H2 database we see Lock timeouts when trying to lock a
table (using LockType.PERSIMISTIC_WRITE). Even with LockTimeout of 60000 this happens. So
we set the LockTimeout directly via SQL and everything works as aspected. The SQL to set the
timeout is:

SET DEFAULT_LOCK_TIMEOUT 60000;


The exception is :

Timeout trying to lock table "MAILBOX" [50200-134] {prepstmnt 18507774 
SELECT t0.mailboxId, t0.lastUid, t0.messageCount, t0.name, t0.size, 
        t0.uidValidity 
    FROM Mailbox t0 
    WHERE (t0.name = ?) 
[params=(String) #mail.INBOX]} [code=50200, state=HYT00]
	at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:257)
	at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:241)
	at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$700(LoggingConnectionDecorator.java:70)
	at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeQuery(LoggingConnectionDecorator.java:1063)
	at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:278)
	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeQuery(JDBCStoreManager.java:1731)
	at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:268)
	at org.apache.openjpa.jdbc.kernel.PreparedSQLStoreQuery$PreparedSQLExecutor.executeQuery(PreparedSQLStoreQuery.java:117)
	... 14 more


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message