jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ruchi goel <Ruchi.G...@Sun.COM>
Subject storing PersistenceManager in httpSession ( jcr mapping layer)
Date Thu, 17 May 2007 13:06:42 GMT
Hi,
   As per Jukka's proposal, it is a good idea to

    * have repository as ServletContextAttribute within
      ServletContextListener
    * jcr session can be stored in httpSession


If I am using jcr mapping layer (OCM) , I access jackrabbit via OCM's 
PersistenceManager  which is something like

new PersistenceManagerImpl(mapper, objectConverter, queryManager, 
jcrSession);


Is it a good idea to have

    * mapper, objectConverter, queryManager set in ServletContext 
      (after reading mapping files as context parameters)  within
      ServletContextListener.
    * store persistenceManager   in httpSession whenever jcrSession is
      added/modified , within HttpSessionAttributeListener  .

In the mapped  java objects , persistencemanager can be  retrieved from  
httpSession.
Thanks,
Ruchi


Mime
View raw message