|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.extensions.jcr.SessionFactoryUtils
public abstract class SessionFactoryUtils
FactoryBean for instantiating a Java Content Repository. This abstract class adds custom functionality subclasses handling only the configuration issues.
| Constructor Summary | |
|---|---|
SessionFactoryUtils()
|
|
| Method Summary | |
|---|---|
static javax.jcr.Session |
doGetSession(SessionFactory sessionFactory,
boolean allowCreate)
Get a JCR Session for the given Repository. |
static javax.jcr.Session |
getSession(SessionFactory sessionFactory,
boolean allowCreate)
Get a JCR Session for the given Repository. |
static boolean |
isSessionThreadBound(javax.jcr.Session session,
SessionFactory sessionFactory)
Return whether the given JCR Session is thread-bound that is, bound to the current thread by Spring's transaction facilities (which is used as a thread-bounding utility class). |
static void |
releaseSession(javax.jcr.Session session,
SessionFactory sessionFactory)
Close the given Session, created via the given repository, if it is not managed externally (i.e. |
static org.springframework.dao.DataAccessException |
translateException(java.io.IOException ex)
Jcr exception translator - it converts specific JSR-170 checked exceptions into unchecked Spring DA exception. |
static org.springframework.dao.DataAccessException |
translateException(javax.jcr.RepositoryException ex)
Jcr exception translator - it converts specific JSR-170 checked exceptions into unchecked Spring DA exception. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SessionFactoryUtils()
| Method Detail |
|---|
public static javax.jcr.Session doGetSession(SessionFactory sessionFactory,
boolean allowCreate)
throws javax.jcr.RepositoryException
getSession but throws the original Repository.
sessionFactory - Jcr Repository to create session withallowCreate - if a non-transactional Session should be created when no transactional Session can
be found for the current thread
javax.jcr.RepositoryException
public static javax.jcr.Session getSession(SessionFactory sessionFactory,
boolean allowCreate)
throws org.springframework.dao.DataAccessException
sessionFactory - JCR Repository to create session withallowCreate - if a non-transactional Session should be created when no transactional Session can
be found for the current thread
org.springframework.dao.DataAccessException
public static boolean isSessionThreadBound(javax.jcr.Session session,
SessionFactory sessionFactory)
session - the JCR Session to checksessionFactory - the JCR SessionFactory that the Session was created with (can be null)
public static void releaseSession(javax.jcr.Session session,
SessionFactory sessionFactory)
session - the Jcr Session to closesessionFactory - JcrSessionFactory that the Session was created with (can be null)public static org.springframework.dao.DataAccessException translateException(javax.jcr.RepositoryException ex)
ex -
public static org.springframework.dao.DataAccessException translateException(java.io.IOException ex)
ex -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||