JBoss EJB client 2.0.0.Beta4

org.jboss.ejb.client
Class EJBClientManagedTransactionContext

java.lang.Object
  extended by org.jboss.ejb.client.Attachable
      extended by org.jboss.ejb.client.EJBClientTransactionContext
          extended by org.jboss.ejb.client.EJBClientManagedTransactionContext

public final class EJBClientManagedTransactionContext
extends EJBClientTransactionContext

A transaction context for environments with a TransactionManager.

Author:
David M. Lloyd

Method Summary
protected  TransactionID getAssociatedTransactionID(EJBClientInvocationContext invocationContext)
          Get the transaction ID to associate with the invocation.
static XAResource getEJBXAResourceForRecovery(EJBReceiverContext receiverContext, String transactionOriginNodeIdentifier)
          Returns a EJB XAResource which can be used *only* during transaction recovery process
protected  String getTransactionNode()
          Get the node to which this transaction is pinned, if any.
static boolean isEJBXAResourceClass(String className)
          Returns true if the passed className corresponds to the fully qualified classname of any of the known EJB XAResource(s).
 
Methods inherited from class org.jboss.ejb.client.EJBClientTransactionContext
create, createLocal, getCurrent, getUserTransaction, requireCurrent, setGlobalContext, setSelector
 
Methods inherited from class org.jboss.ejb.client.Attachable
getAttachment, getAttachments, putAttachment, putAttachmentIfAbsent, removeAttachment, removeAttachment, replaceAttachment, replaceAttachment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAssociatedTransactionID

protected TransactionID getAssociatedTransactionID(EJBClientInvocationContext invocationContext)
                                            throws Exception
Description copied from class: EJBClientTransactionContext
Get the transaction ID to associate with the invocation. The transaction ID typically comes from the current thread's transaction context.

Specified by:
getAssociatedTransactionID in class EJBClientTransactionContext
Parameters:
invocationContext - the invocation context
Returns:
the transaction ID to associate, or null for none
Throws:
Exception - if an exception occurs

getTransactionNode

protected String getTransactionNode()
Description copied from class: EJBClientTransactionContext
Get the node to which this transaction is pinned, if any.

Specified by:
getTransactionNode in class EJBClientTransactionContext
Returns:
the node name or null if the transaction is not pinned

getEJBXAResourceForRecovery

public static XAResource getEJBXAResourceForRecovery(EJBReceiverContext receiverContext,
                                                     String transactionOriginNodeIdentifier)
Returns a EJB XAResource which can be used *only* during transaction recovery process

Parameters:
transactionOriginNodeIdentifier - The node identifier of the node from which the transaction originated
receiverContext - The EJB receiver context of the target EJB receiver/server which will be used to fetch the Xid(s) which need to be recovered
Returns:

isEJBXAResourceClass

public static boolean isEJBXAResourceClass(String className)
Returns true if the passed className corresponds to the fully qualified classname of any of the known EJB XAResource(s). Else returns false.

Parameters:
className - The fully qualified name of the class which is being checked for being a EJB XAResource
Returns:

JBoss EJB client 2.0.0.Beta4

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.