jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian Reschke (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (JCR-3249) clarify/tune RepositoryService lifecycle
Date Mon, 05 Mar 2012 11:45:57 GMT
clarify/tune RepositoryService lifecycle

                 Key: JCR-3249
                 URL: https://issues.apache.org/jira/browse/JCR-3249
             Project: Jackrabbit Content Repository
          Issue Type: Improvement
          Components: jackrabbit-jcr2spi, jackrabbit-spi
            Reporter: Julian Reschke

Spent some time with a caching issue in my RepositoryService, only to find out that the lifecycle
of the service is not necessarily the same as the one of the JCR2SPI RepositoryImpl.


    public Session login(Credentials credentials, String workspaceName) throws LoginException,
NoSuchWorkspaceException, RepositoryException {
        SessionInfo info = config.getRepositoryService().obtain(credentials, workspaceName);
        try {
            if (info instanceof XASessionInfo) {
                return new XASessionImpl((XASessionInfo) info, this, config);
            } else {
                return new SessionImpl(info, this, config);
        } catch (RepositoryException ex) {
            throw ex;

So unless the RepositoryConfig caches the service, a new one will be built for each new JCR

Is this intentional? In which case we should augment the Javadoc. Otherwise it might be good
to change it to have a one-to-ine relation between Repository and RepositoryService...

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message