|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.orm.toplink.ServerSessionFactory
public class ServerSessionFactory
Full-fledged default implementation of the SessionFactory interface: creates ClientSessions for a given ServerSession.
Can create a special ClientSession subclass for managed Sessions, carrying an active UnitOfWork that expects to be committed at transaction completion (just like a plain TopLink Session does within a JTA transaction).
Can also create a transaction-aware Session reference that returns the
active transactional Session on getActiveSession
.
SingleSessionFactory
,
Session.getActiveUnitOfWork()
,
Session.getActiveSession()
Constructor Summary | |
---|---|
ServerSessionFactory(oracle.toplink.threetier.ServerSession serverSession)
Create a new ServerSessionFactory for the given ServerSession. |
Method Summary | |
---|---|
void |
close()
Shut the pre-configured TopLink ServerSession down. |
oracle.toplink.sessions.Session |
createManagedClientSession()
Create a managed ClientSession for this factory's ServerSession. |
oracle.toplink.sessions.Session |
createSession()
Create a plain ClientSession for this factory's ServerSession. |
oracle.toplink.sessions.Session |
createTransactionAwareSession()
Create a transaction-aware Session refeence for this factory's ServerSession, expecting transactions to be registered for this SessionFactory. |
oracle.toplink.sessions.Session |
createTransactionAwareSession(SessionFactory sessionFactory)
Create a transaction-aware Session refeence for this factory's ServerSession, expecting transactions to be registered for the given SessionFactory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServerSessionFactory(oracle.toplink.threetier.ServerSession serverSession)
serverSession
- the TopLink ServerSession to create ClientSessions forMethod Detail |
---|
public oracle.toplink.sessions.Session createSession()
createSession
in interface SessionFactory
ServerSession.acquireClientSession()
public oracle.toplink.sessions.Session createManagedClientSession()
createManagedClientSession
in interface SessionFactory
ClientSession
public oracle.toplink.sessions.Session createTransactionAwareSession() throws oracle.toplink.exceptions.TopLinkException
createTransactionAwareSession
in interface SessionFactory
oracle.toplink.exceptions.TopLinkException
- in case of errorsSession.getActiveSession()
,
Session.getActiveUnitOfWork()
public oracle.toplink.sessions.Session createTransactionAwareSession(SessionFactory sessionFactory) throws oracle.toplink.exceptions.TopLinkException
This method is public to allow custom SessionFactory facades to access it directly, if necessary.
sessionFactory
- the SessionFactory that transactions
are expected to be registered for
oracle.toplink.exceptions.TopLinkException
Session.getActiveSession()
,
Session.getActiveUnitOfWork()
public void close()
close
in interface SessionFactory
DatabaseSession.logout()
,
Session.release()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |