站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.1.0 API 文档英文版

ServerSessionFactory (Spring Framework API 2.1) - Spring Framework 2.1.0 API 文档英文版


The Spring Framework

org.springframework.orm.toplink
Class ServerSessionFactory

java.lang.Object
  extended by org.springframework.orm.toplink.AbstractSessionFactory
      extended by org.springframework.orm.toplink.ServerSessionFactory
All Implemented Interfaces:
SessionFactory

public class ServerSessionFactory
extends AbstractSessionFactory

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.

Since:
1.2
Author:
Juergen Hoeller
See Also:
SingleSessionFactory, Session.getActiveUnitOfWork(), Session.getActiveSession()

Field Summary
 
Fields inherited from class org.springframework.orm.toplink.AbstractSessionFactory
logger
 
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.
protected  oracle.toplink.sessions.Session createClientSession()
          Create a plain ClientSession for this factory's ServerSession.
protected  oracle.toplink.sessions.Session getMasterSession()
          Return this factory's ServerSession as-is.
 
Methods inherited from class org.springframework.orm.toplink.AbstractSessionFactory
createManagedClientSession, createSession, createTransactionAwareSession, createTransactionAwareSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerSessionFactory

public ServerSessionFactory(oracle.toplink.threetier.ServerSession serverSession)
Create a new ServerSessionFactory for the given ServerSession.

Parameters:
serverSession - the TopLink ServerSession to create ClientSessions for
Method Detail

getMasterSession

protected oracle.toplink.sessions.Session getMasterSession()
Return this factory's ServerSession as-is.

Specified by:
getMasterSession in class AbstractSessionFactory

createClientSession

protected oracle.toplink.sessions.Session createClientSession()
                                                       throws oracle.toplink.exceptions.TopLinkException
Create a plain ClientSession for this factory's ServerSession.

Specified by:
createClientSession in class AbstractSessionFactory
Throws:
oracle.toplink.exceptions.TopLinkException - if creation of a client Session failed
See Also:
ServerSession.acquireClientSession()

close

public void close()
Shut the pre-configured TopLink ServerSession down.

See Also:
DatabaseSession.logout(), Session.release()

The Spring Framework

Copyright © 2002-2007 The Spring Framework.