You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Romain Manni-Bucau (JIRA)" <ji...@apache.org> on 2017/06/12 19:54:00 UTC

[jira] [Commented] (TOMEE-2062) HSQLDB Deadlock

    [ https://issues.apache.org/jira/browse/TOMEE-2062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16046987#comment-16046987 ] 

Romain Manni-Bucau commented on TOMEE-2062:
-------------------------------------------

We do that for some tests requiring some concurrency. Not sure how much users rely on the default but it can break usages too so not sure we are that free to do it.

> HSQLDB Deadlock
> ---------------
>
>                 Key: TOMEE-2062
>                 URL: https://issues.apache.org/jira/browse/TOMEE-2062
>             Project: TomEE
>          Issue Type: Bug
>            Reporter: Svetlin Zarev
>
> I was running tests with eclipselink on my vanilla tomee when it just froze during one of the tests. After a little bit of debugging and research it turned out to be a well known issue with HSQLDB: [1] 
> {code}
> The default transaction model is LOCKS which locks a table that is modified until the transaction is committed. You can use the MVCC model instead, which allows other sessions to read from the table and to modify rows that have not been modified.
> {code}
> The solution as stated in the SO answer is to add ;hsqldb.tx=mvcc to the hsqldb connection string. IMO it would make sense add this to the default connection string specified in tomee-webapp's service-jar.xml, so it becomes:
> {code}
> <ServiceProvider id="Default JDBC Database" parent="org.apache.openejb:Default JDBC Database">
>     JdbcUrl=jdbc:hsqldb:file:data/hsqldb/hsqldb;hsqldb.tx=mvcc
>   </ServiceProvider>
>   <ServiceProvider id="Default Unmanaged JDBC Database" parent="org.apache.openejb:Default Unmanaged JDBC Database">
>     JdbcUrl=jdbc:hsqldb:file:data/hsqldb/hsqldb;hsqldb.tx=mvcc
>   </ServiceProvider>
> {code}
> [1] https://stackoverflow.com/a/16109062/2588800



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)