Class ContextManager
java.lang.Object
com.arjuna.ats.internal.jts.context.ContextManager
This class is responsible for managing the thread-to-transaction
context mappings.
- Since:
- JTS 1.0.
- Version:
- $Id: ContextManager.java 2342 2006-03-30 13:06:17Z $
- Author:
- Mark Little (mark@arjuna.com)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
final boolean
final boolean
addRemoteHierarchy
(Control cont) We could maintain a list of suspended action hierarchies and resume the right one (and the right place!) given the control.void
Force the thread-to-transaction association.final com.arjuna.ats.internal.jts.ControlWrapper
createHierarchy
(org.omg.CORBA.Any ctx) final com.arjuna.ats.internal.jts.ControlWrapper
createProxy
(org.omg.CORBA.Any ctx) com.arjuna.ats.internal.jts.ControlWrapper
current()
Get the transaction for the invoking thread.com.arjuna.ats.internal.jts.ControlWrapper
Get the current transaction associated with the invoking thread.com.arjuna.ats.internal.jts.ControlWrapper
final void
disassociateContext
(int slotId) final com.arjuna.ats.internal.jts.ControlWrapper
final com.arjuna.ats.internal.jts.ControlWrapper
final void
final void
purgeActions
(String threadId) final void
pushAction
(com.arjuna.ats.internal.jts.ControlWrapper action) If we have a hierarchy of remote actions (controls) then they will not be registered with BasicAction.
-
Constructor Details
-
ContextManager
public ContextManager()
-
-
Method Details
-
current
public com.arjuna.ats.internal.jts.ControlWrapper current(String threadId) throws org.omg.CORBA.SystemException Get the current transaction associated with the invoking thread. Do not look in the PI thread data. Does not need to be synchronized since it is implicitly single-threaded.- Returns:
- the context.
- Throws:
org.omg.CORBA.SystemException
-
current
public com.arjuna.ats.internal.jts.ControlWrapper current() throws org.omg.CORBA.SystemExceptionGet the transaction for the invoking thread. If there isn't one in the normal thread associated data then look in the PI implementation.- Returns:
- the current transaction for the invoking thread.
- Throws:
org.omg.CORBA.SystemException
-
popAction
-
popAction
public final com.arjuna.ats.internal.jts.ControlWrapper popAction() -
purgeActions
-
purgeActions
public final void purgeActions() -
associate
public void associate() throws org.omg.CORBA.SystemExceptionForce the thread-to-transaction association. Applications should not use this method.- Throws:
org.omg.CORBA.SystemException
- Since:
- JTS 2.1.1.
-
addRemoteHierarchy
We could maintain a list of suspended action hierarchies and resume the right one (and the right place!) given the control. However, this can lead to memory leaks, since we never know when to remove this hierarchy information. So, for now we simply rely on the propagation context. -
addActionControlHierarchy
-
addControlImpleHierarchy
-
pushAction
public final void pushAction(com.arjuna.ats.internal.jts.ControlWrapper action) If we have a hierarchy of remote actions (controls) then they will not be registered with BasicAction. Also, they will either all be remote references to controls, or all but the current action will be proxy/wrapper controls, i.e., controls which contain references to the remote coordinator/terminator. -
currentPIContext
public com.arjuna.ats.internal.jts.ControlWrapper currentPIContext() throws org.omg.CORBA.SystemException- Throws:
org.omg.CORBA.SystemException
-
createProxy
public final com.arjuna.ats.internal.jts.ControlWrapper createProxy(org.omg.CORBA.Any ctx) throws org.omg.CORBA.SystemException - Throws:
org.omg.CORBA.SystemException
-
createHierarchy
public final com.arjuna.ats.internal.jts.ControlWrapper createHierarchy(org.omg.CORBA.Any ctx) throws org.omg.CORBA.SystemException - Throws:
org.omg.CORBA.SystemException
-
disassociateContext
public final void disassociateContext(int slotId) throws org.omg.CORBA.SystemException - Throws:
org.omg.CORBA.SystemException
-
getReceivedCoordinatorUid
- Throws:
org.omg.PortableInterceptor.InvalidSlot
-