jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grégory Joseph (JIRA) <j...@apache.org>
Subject [jira] Issue Comment Edited: (JCR-1778) BindableRepositoryFactory doesn't handle repository shutdown
Date Mon, 12 Jan 2009 22:10:01 GMT

    [ https://issues.apache.org/jira/browse/JCR-1778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12663117#action_12663117
] 

gjoseph edited comment on JCR-1778 at 1/12/09 2:08 PM:
--------------------------------------------------------------

Seems to me as this is (if only by accident) related to JCR-1823

      was (Author: gjoseph):
    Seems to as this is (if only by accident) related to JCR-1823
  
> BindableRepositoryFactory doesn't handle repository shutdown
> ------------------------------------------------------------
>
>                 Key: JCR-1778
>                 URL: https://issues.apache.org/jira/browse/JCR-1778
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>            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.


Mime
View raw message