|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.orm.toplink.SingleSessionFactory
public class SingleSessionFactory
Simple implementation of the SessionFactory interface: always returns the passed-in Session as-is.
Useful for testing or standalone usage of TopLink-based data access objects. In a server environment, use ServerSessionFactory instead.
ServerSessionFactory
Constructor Summary | |
---|---|
SingleSessionFactory(oracle.toplink.sessions.Session session)
Create a new SingleSessionFactory with the given Session. |
Method Summary | |
---|---|
void |
close()
Shut the pre-configured TopLink Session down. |
oracle.toplink.sessions.Session |
createManagedClientSession()
Throws an UnsupportedOperationException: SingleSessionFactory does not support managed client Sessions. |
oracle.toplink.sessions.Session |
createSession()
Return the held TopLink Session as-is. |
oracle.toplink.sessions.Session |
createTransactionAwareSession()
Throws an UnsupportedOperationException: SingleSessionFactory does not support transaction-aware Sessions. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SingleSessionFactory(oracle.toplink.sessions.Session session)
session
- the TopLink Session to holdMethod Detail |
---|
public oracle.toplink.sessions.Session createSession()
createSession
in interface SessionFactory
SessionFactoryUtils.getSession(SessionFactory, boolean)
public oracle.toplink.sessions.Session createManagedClientSession()
createManagedClientSession
in interface SessionFactory
Session.getActiveUnitOfWork()
public oracle.toplink.sessions.Session createTransactionAwareSession()
createTransactionAwareSession
in interface SessionFactory
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 |