|
JBoss EJB client 1.0.5.Final | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.ejb.client.Attachable
org.jboss.ejb.client.EJBClientTransactionContext
public abstract class EJBClientTransactionContext
The transaction context for an EJB client.
Constructor Summary | |
---|---|
EJBClientTransactionContext()
|
Method Summary | |
---|---|
static EJBClientTransactionContext |
create(TransactionManager transactionManager,
TransactionSynchronizationRegistry synchronizationRegistry)
Create a transaction context which is controlled by an actual transaction manager. |
static EJBClientTransactionContext |
createLocal()
Create a local client transaction context which is controlled directly via UserTransaction methods. |
protected abstract TransactionID |
getAssociatedTransactionID(EJBClientInvocationContext invocationContext)
Get the transaction ID to associate with the invocation. |
static EJBClientTransactionContext |
getCurrent()
Get the current client transaction context. |
protected abstract String |
getTransactionNode()
Get the node to which this transaction is pinned, if any. |
protected UserTransaction |
getUserTransaction(String nodeName)
Get a UserTransaction instance affiliated with a specific remote node to control the transaction
state. |
static EJBClientTransactionContext |
requireCurrent()
Get the current client transaction context, throwing an exception if one is not available. |
static void |
setGlobalContext(EJBClientTransactionContext context)
Set the singleton, global transaction context. |
static void |
setSelector(ContextSelector<EJBClientTransactionContext> selector)
Set the client transaction context selector. |
Methods inherited from class org.jboss.ejb.client.Attachable |
---|
getAttachment, putAttachment, putAttachmentIfAbsent, removeAttachment, removeAttachment, replaceAttachment, replaceAttachment |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EJBClientTransactionContext()
Method Detail |
---|
protected abstract TransactionID getAssociatedTransactionID(EJBClientInvocationContext invocationContext) throws Exception
invocationContext
- the invocation context
null
for none
Exception
- if an exception occursprotected abstract String getTransactionNode()
null
if the transaction is not pinnedpublic static void setSelector(ContextSelector<EJBClientTransactionContext> selector) throws SecurityException
selector
- the selector to set
SecurityException
- if a security manager is installed and you do not have the setClientTransactionContextSelector
RuntimePermission
public static void setGlobalContext(EJBClientTransactionContext context) throws SecurityException
setSelector(ContextSelector)
.
context
- the context to set
SecurityException
- if a security manager is installed and you do not have the setClientTransactionContextSelector
RuntimePermission
public static EJBClientTransactionContext requireCurrent() throws IllegalStateException
IllegalStateException
- if no context is availablepublic static EJBClientTransactionContext getCurrent()
public static EJBClientTransactionContext createLocal()
UserTransaction
methods.
public static EJBClientTransactionContext create(TransactionManager transactionManager, TransactionSynchronizationRegistry synchronizationRegistry)
transactionManager
- the transaction managersynchronizationRegistry
- the transaction synchronization registry
protected UserTransaction getUserTransaction(String nodeName)
UserTransaction
instance affiliated with a specific remote node to control the transaction
state. The instance is only usable while there is an active connection with the given peer.
nodeName
- the remote node name
|
JBoss EJB client 1.0.5.Final | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |