[
https://issues.apache.org/jira/browse/OAK-280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chetan Mehrotra updated OAK-280:
--------------------------------
Assignee: Chetan Mehrotra
> H2 should be configured for not to close on exit
> ------------------------------------------------
>
> Key: OAK-280
> URL: https://issues.apache.org/jira/browse/OAK-280
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: mk
> Affects Versions: 0.5
> Reporter: Chetan Mehrotra
> Assignee: Chetan Mehrotra
> Priority: Minor
>
> By default H2 registers itself with shutdown hook to close the database on
> exit. However in managed env like OSGi it would be preferable to disable this
> behaviour[1] as bundle shutdown logic takes care of closing such resources.
> Without this following exceptions are logged
> {noformat}
> 24.08.2012 19:11:09.005 *ERROR* [RevisionStore-GC]
> org.apache.jackrabbit.mk.store.DefaultRevisionStore Exception occurred in GC
> cycle org.h2.jdbc.JdbcSQLException: Database is already closed (to disable
> automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db
> URL) [90121-158]
> at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
> at org.h2.message.DbException.get(DbException.java:169)
> at org.h2.message.DbException.get(DbException.java:146)
> at org.h2.message.DbException.get(DbException.java:135)
> at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1394)
> at
> org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1379)
> at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:463)
> at
> org.h2.jdbcx.JdbcXAConnection.getConnection(JdbcXAConnection.java:106)
> at
> org.h2.jdbcx.JdbcConnectionPool.getConnectionNow(JdbcConnectionPool.java:228)
> at
> org.h2.jdbcx.JdbcConnectionPool.getConnection(JdbcConnectionPool.java:199)
> at
> org.apache.jackrabbit.mk.persistence.H2Persistence.readCommit(H2Persistence.java:168)
> {noformat}
> [1] http://www.h2database.com/html/features.html#do_not_close_on_exit
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira