|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SessionManager
With a SessionManager instance you a repository is able to retrieve sessions to interact with an external repository system like a RDBMS.
A SessionManager can exist with two different SessionMode:
In long running mode the session will be alive until the session manager is
released using the release() or reset() method.
| Method Summary | ||
|---|---|---|
|
getSession(Class<S> sessionClass)
Retrieves a session associated with this SessionManager. |
|
SessionMode |
getSessionMode()
Retrieves the SessionMode associated with this SessionManager |
|
boolean |
hasSessionMode(SessionMode sMode)
Check if this SessionManager has a certain SessionMode |
|
boolean |
isReleased()
Check if this SessionManager has been released. |
|
void |
release()
Release this SessionManager and close all the associated sessions. |
|
void |
reset()
Close all the associated sessions. |
|
void |
setSessionMode(SessionMode sessionMode)
|
|
org.apache.commons.collections.Closure |
transactionalClosure(org.apache.commons.collections.Closure toBeDone)
Decorate a closure so that it will be executed in a transactional context. |
|
| Method Detail |
|---|
SessionMode getSessionMode()
SessionMode associated with this SessionManager
SessionMode associated with this SessionManagervoid setSessionMode(SessionMode sessionMode)
boolean hasSessionMode(SessionMode sMode)
SessionMode
sMode - the SessionMode to check
SessionMode<S> S getSession(Class<S> sessionClass)
S - sessionClass - the class of the needed session
IllegalStateException - if this SessionManager has been released calling the
release() methodvoid release()
getSession(Class) method is called an IllegalStateException will be thrown
boolean isReleased()
#release()}void reset()
getSession(Class) method
is called a new session will be opened.
org.apache.commons.collections.Closure transactionalClosure(org.apache.commons.collections.Closure toBeDone)
toBeDone - the closure to be decorated
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||