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.
author: Juergen Hoeller since: 1.2 See Also:ServerSessionFactory
Constructor Summary
public
SingleSessionFactory(Session session) Create a new SingleSessionFactory with the given Session.
Method Summary
public void
close() Shut the pre-configured TopLink Session down.
public Session
createManagedClientSession() Throws an UnsupportedOperationException: SingleSessionFactory does not
support managed client Sessions.
public Session
createSession() Return the held TopLink Session as-is.
public Session
createTransactionAwareSession() Throws an UnsupportedOperationException: SingleSessionFactory does not
support transaction-aware Sessions.
Constructor Detail
SingleSessionFactory
public SingleSessionFactory(Session session)(Code)
Create a new SingleSessionFactory with the given Session.
Parameters: session - the TopLink Session to hold
Shut the pre-configured TopLink Session down.
See Also: oracle.toplink.sessions.DatabaseSession.logout See Also: oracle.toplink.sessions.Session.release