jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Reschke <julian.resc...@gmx.de>
Subject JCR2SPI RepositoryConfig lifecycle
Date Thu, 01 Mar 2012 20:04:13 GMT

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.


     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, 
             } else {
                 return new SessionImpl(info, this, config);
         } catch (RepositoryException ex) {
             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

View raw message