org.jboss.proxy
Class ClientUserTransactionStickyInterceptor

java.lang.Object
  extended by org.jboss.proxy.Interceptor
      extended by org.jboss.proxy.AbstractTransactionStickyInterceptor
          extended by org.jboss.proxy.ClientUserTransactionStickyInterceptor
All Implemented Interfaces:
Externalizable, Serializable

public class ClientUserTransactionStickyInterceptor
extends AbstractTransactionStickyInterceptor

The ClientUserTransactionStickyInterceptor should be used as an interceptor for the HA proxy in the ClientUserTransactionService. The aim of this interceptor is twofold: First, when UserTransaction.begin() is called, the result of the invocation, which is the transaction propagation context of the transaction started, is stored together with the target server used, so that future invocations can make use of the sticky target. Secondly, for the rest of UserTransaction invocations, i.e. commit(), getStatus()...etc, the current tpc is retrieved and the sticky target is located and added to the transient payload of the invocation.

Author:
Galder Zamarreno
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jboss.proxy.AbstractTransactionStickyInterceptor
log, trace
 
Fields inherited from class org.jboss.proxy.Interceptor
nextInterceptor
 
Constructor Summary
ClientUserTransactionStickyInterceptor()
           
 
Method Summary
 void invocationHasReachedAServer(Invocation invocation, Object response)
           
 Object invoke(Invocation invocation)
           
 
Methods inherited from class org.jboss.proxy.AbstractTransactionStickyInterceptor
getFamilyClusterInfo, getTransactionPropagationContext, putIfExistsTransactionTarget, readExternal, rememberTransactionTarget
 
Methods inherited from class org.jboss.proxy.Interceptor
getNext, setNext, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientUserTransactionStickyInterceptor

public ClientUserTransactionStickyInterceptor()
Method Detail

invoke

public Object invoke(Invocation invocation)
              throws Throwable
Specified by:
invoke in class Interceptor
Throws:
Throwable

invocationHasReachedAServer

public void invocationHasReachedAServer(Invocation invocation,
                                        Object response)


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.