org.jboss.proxy
Class AbstractTransactionStickyInterceptor
java.lang.Object
org.jboss.proxy.Interceptor
org.jboss.proxy.AbstractTransactionStickyInterceptor
- All Implemented Interfaces:
- Externalizable, Serializable
- Direct Known Subclasses:
- ClientUserTransactionStickyInterceptor, TransactionStickyInterceptor
public abstract class AbstractTransactionStickyInterceptor
- extends Interceptor
Parent transaction sticky interceptor that encapsulates sticky target map
and exposes operations on this map.
- Author:
- Galder Zamarreno
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected final Logger log
trace
protected static boolean trace
AbstractTransactionStickyInterceptor
public AbstractTransactionStickyInterceptor()
putIfExistsTransactionTarget
protected void putIfExistsTransactionTarget(Invocation invocation)
throws Exception
- Called at the beginning of the invocation to check whether the current tpc
is already present in the tx sticky target. If it is, get the chosen
target associated to it and add it to the invocation transient payload so
that the load balance policy can choose the right target as long as the
target is available in the cluster family. Otherwise, invocation needs to
be halted because a previous invocation within the transaction succeeded
(tx sticky target was set), so we can't failover to a different node.
- Parameters:
invocation
- Invocation object where transaction sticky will be set
if present.
- Throws:
Exception
rememberTransactionTarget
protected void rememberTransactionTarget(Invocation invocation,
Object tpc)
- Method called to remember the sticky target associated with a transaction
context.
- Parameters:
invocation
- Invocation object from which the TX_STICKY_TARGET
transient value comes from.tpc
- Transaction propagation context.
readExternal
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
- Specified by:
readExternal
in interface Externalizable
- Overrides:
readExternal
in class Interceptor
- Throws:
IOException
ClassNotFoundException
getTransactionPropagationContext
protected Object getTransactionPropagationContext()
getFamilyClusterInfo
protected org.jboss.ha.framework.interfaces.FamilyClusterInfo getFamilyClusterInfo(Invocation invocation)
throws Exception
- Throws:
Exception
Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.