IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.objectgrid.spring
Interface SpringLocalTxManager


public interface SpringLocalTxManager

This interface has the methods for interacting with the ObjectGrid Spring LocalTransactionManager. It also allows the desired partition to use with this thread to be specified.

Since:
WAS XD 6.1 FIX3, XC10
See Also:
ObjectGridSpringFactory.getLocalPlatformTransactionManager()

Method Summary
 Session getSession()
          This returns a managed session for the ObjectGrid associated with this thread.
 void setObjectGridForThread(ObjectGrid grid)
          This indicates the ObjectGrid to use on this thread when a session is requested.
 

Method Detail

setObjectGridForThread

void setObjectGridForThread(ObjectGrid grid)
This indicates the ObjectGrid to use on this thread when a session is requested. This replaces any previously associated ObjectGrid, i.e. only a single grid instance can be associated with a thread at a time.

Parameters:
grid - the ObjectGrid to set on this thread.
See Also:
getSession()

getSession

Session getSession()
This returns a managed session for the ObjectGrid associated with this thread.

Do not call begin(), commit() or rollback() directly on the session. Spring manages the transaction automatically.

Returns:
A managed Session to use with this thread.
Throws:
CannotGetObjectGridSessionException - thrown when an ObjectGrid session can't be retrieved.
See Also:
setObjectGridForThread(ObjectGrid)

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

© Copyright International Business Machines Corp 2005,2012. All rights reserved.