| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 hold| Method Detail | 
|---|
public oracle.toplink.sessions.Session createSession()
createSession in interface SessionFactorySessionFactoryUtils.getSession(SessionFactory, boolean)public oracle.toplink.sessions.Session createManagedClientSession()
createManagedClientSession in interface SessionFactorySession.getActiveUnitOfWork()public oracle.toplink.sessions.Session createTransactionAwareSession()
createTransactionAwareSession in interface SessionFactorySession.getActiveSession(), 
Session.getActiveUnitOfWork()public void close()
close in interface SessionFactoryDatabaseSession.logout(), 
Session.release()| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||