jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller (JIRA)" <j...@apache.org>
Subject [jira] Created: (JCR-2816) Repository is not unlocked if version manager init failed and assertions are enabled
Date Mon, 22 Nov 2010 10:57:15 GMT
Repository is not unlocked if version manager init failed and assertions are enabled
------------------------------------------------------------------------------------

                 Key: JCR-2816
                 URL: https://issues.apache.org/jira/browse/JCR-2816
             Project: Jackrabbit Content Repository
          Issue Type: Bug
            Reporter: Thomas Mueller
            Assignee: Thomas Mueller


The following test case will work as expected, except when assertions are enabled (java -ea
...):

Connection conn = DriverManager.getConnection(
        "jdbc:derby:repository/version/db;create=true");
Statement stat = conn.createStatement();
stat.execute("create table version_bundle(id int)");
TransientRepository rep = new TransientRepository();
try {
    rep.login(new SimpleCredentials("", new char[0]));
} catch (Exception e) {
    // ignore
}
rep.shutdown();
stat.execute("drop table version_bundle");
new TransientRepository().login(new SimpleCredentials("", new char[0]));

The reason is the assertion in RepositoryContext.getInternalVersionManager. Because of this
assertion, the repository lock is not released during the repository shutdown.


-- 
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