org.springframework.extensions.jcr
Interface SessionFactory

All Known Implementing Classes:
JackrabbitSessionFactory, JcrSessionFactory

public interface SessionFactory

Session Factory interface. This interface describes a simplfied contract for retrieving a session and acts as a central point inside Spring Extensions JCR support.

Author:
Costin Leau, Sergio Bossa, Salvatore Incandela

Method Summary
 javax.jcr.Session getSession()
          Returns a JCR Session using the credentials and workspace on this JcrSessionFactory.
 SessionHolder getSessionHolder(javax.jcr.Session session)
          Returns a specific SessionHolder for the given Session.
 

Method Detail

getSession

javax.jcr.Session getSession()
                             throws javax.jcr.RepositoryException
Returns a JCR Session using the credentials and workspace on this JcrSessionFactory. The session factory doesn't allow specification of a different workspace name because:

" Each Session object is associated one-to-one with a Workspace object. The Workspace object represents a `view` of an actual repository workspace entity as seen through the authorization settings of its associated Session." (quote from javax.jcr.Session javadoc).

Returns:
the JCR session.
Throws:
javax.jcr.RepositoryException

getSessionHolder

SessionHolder getSessionHolder(javax.jcr.Session session)
Returns a specific SessionHolder for the given Session. The holder provider is used internally by the framework in components such as transaction managers to provide implementation specific information such as transactional support (if it is available).

Returns:
specific sessionHolder.


Copyright © 2009. All Rights Reserved.