You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "René Link (JIRA)" <ji...@apache.org> on 2010/01/20 10:36:21 UTC

[jira] Updated: (JCR-1778) BindableRepositoryFactory doesn't handle repository shutdown

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

René Link updated JCR-1778:
---------------------------

    Affects Version/s: 2.1.0
                       2.0.0
                       1.6.1
                       1.5.8
                       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.6.0
                       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
               Status: Patch Available  (was: Open)

Patch  do prevent invalid repository object to remain in the BindableRepositoryFactory's cache

> 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: 2.0-beta6, 2.0-beta5, 2.0-beta4, 2.0-beta3, 2.0-beta1, 2.0-alpha11, 2.0-alpha9, 2.0-alpha8, 2.0-alpha7, 2.0-alpha4, 2.0-alpha3, 2.0-alpha1, 1.6.0, 1.5.7, 1.5.6, 1.5.5, 1.5.4, 1.5.3, 1.5.2, 1.5.0, core-1.4.11, core 1.4.10, core 1.4.9, core 1.4.7, core 1.4.8, core 1.4.6, 1.5.8, 1.6.1, 2.0.0, 2.1.0
>            Reporter: Jukka Zitting
>            Priority: Minor
>
> 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.
-
You can reply to this email to add a comment to the issue online.