Hi,

today I 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.

See

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) {
            config.getRepositoryService().dispose(info);
            throw ex;
        }
    }

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

Is this intentional? In which case we should augment the Javadoc.

Best regards, Julian

Reply via email to