jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] Updated: (JCR-1778) BindableRepositoryFactory doesn't handle repository shutdown
Date Tue, 13 Apr 2010 16:09:50 GMT

     [ https://issues.apache.org/jira/browse/JCR-1778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jukka Zitting updated JCR-1778:
-------------------------------

           Status: Resolved  (was: Patch Available)
         Assignee: Jukka Zitting
    Fix Version/s: 2.1.0
       Resolution: Fixed

Thanks for the patch! I committed a slightly modified version to Jackrabbit trunk in revision
933694 and merged the change to the 2.1 branch in revision 933697.

> BindableRepositoryFactory doesn't handle repository shutdown
> ------------------------------------------------------------
>
>                 Key: JCR-1778
>                 URL: https://issues.apache.org/jira/browse/JCR-1778
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: core 1.4.6, core 1.4.8, core 1.4.7, core 1.4.9, core 1.4.10, core-1.4.11,
1.5.0, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.6.0, 1.6.1, 2.0-alpha1, 2.0-alpha3,
2.0-alpha4, 2.0-alpha7, 2.0-alpha8, 2.0-alpha9, 2.0-alpha11, 2.0-beta1, 2.0-beta3, 2.0-beta4,
2.0-beta5, 2.0-beta6, 2.0.0, 2.1.0
>            Reporter: Jukka Zitting
>            Assignee: Jukka Zitting
>            Priority: Minor
>             Fix For: 2.1.0
>
>         Attachments: BindableRepositoryFactory.java.patch
>
>
> The BindableRepositoryFactory class keeps a cached reference to a repository even after
the repository has been shut down.
> This causes the following code snippet to fail with an IllegalStateException:
>         Hashtable environment = new Hashtable();
>         environment.put(
>                 Context.INITIAL_CONTEXT_FACTORY,
>                 DummyInitialContextFactory.class.getName());
>         environment.put(Context.PROVIDER_URL, "http://jackrabbit.apache.org/");
>         Context context = new InitialContext(environment);
>         JackrabbitRepository repository;
>         String xml = "src/test/repository/repository.xml";
>         String dir = "target/repository";
>         String key = "repository";
>         // Create first repository
>         RegistryHelper.registerRepository(context, key, xml, dir, true);
>         repository = (JackrabbitRepository) context.lookup(key);
>         repository.login().logout();
>         repository.shutdown();
>         // Create second repository with the same configuration
>         RegistryHelper.registerRepository(context, key, xml, dir, true);
>         repository = (JackrabbitRepository) context.lookup(key);
>         repository.login().logout(); // throws an IllegalStateException!
>         repository.shutdown();

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message