[
https://issues.apache.org/jira/browse/JCR-1778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
René Link updated JCR-1778:
---------------------------
Attachment: BindableRepositoryFactory.java.patch
> 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
> Priority: Minor
> 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.
-
You can reply to this email to add a comment to the issue online.