public final class RemotingConnectionEJBReceiver extends EJBReceiver
EJBReceiver
which uses JBoss Remoting to communicate with the server for EJB invocationsConstructor and Description |
---|
RemotingConnectionEJBReceiver(Connection connection)
Construct a new instance.
|
RemotingConnectionEJBReceiver(Connection connection,
ReconnectHandler reconnectHandler,
OptionMap channelCreationOptions)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
associate(EJBReceiverContext context)
Handle the association of this EJB receiver with the EJB client context.
|
protected void |
beforeCompletion(EJBReceiverContext receiverContext,
TransactionID transactionID)
The before-completion hook.
|
boolean |
exists(String appName,
String moduleName,
String distinctName,
String beanName)
Verify the existence of a remote EJB.
|
protected <T> StatefulEJBLocator<T> |
openSession(EJBReceiverContext receiverContext,
Class<T> viewType,
String appName,
String moduleName,
String distinctName,
String beanName)
Creates a session for a stateful session bean represented by the passed app name, module name, distinct name
and bean name combination.
|
void |
processInvocation(EJBClientInvocationContext clientInvocationContext,
EJBReceiverInvocationContext ejbReceiverInvocationContext)
Process the invocation.
|
protected void |
sendCommit(EJBReceiverContext receiverContext,
TransactionID transactionID,
boolean onePhase)
Send a transaction-commit message for the given transaction ID.
|
protected void |
sendForget(EJBReceiverContext receiverContext,
TransactionID transactionID)
Send a transaction-forget message for the given transaction ID.
|
protected int |
sendPrepare(EJBReceiverContext receiverContext,
TransactionID transactionID)
Send a transaction-prepare message for the given transaction ID.
|
protected void |
sendRollback(EJBReceiverContext receiverContext,
TransactionID transactionID)
Send a transaction-rollback message for the given transaction ID.
|
String |
toString() |
cancelInvocation, deregisterModule, getNodeName, registerModule
getAttachment, putAttachment, putAttachmentIfAbsent, removeAttachment, removeAttachment, replaceAttachment, replaceAttachment
public RemotingConnectionEJBReceiver(Connection connection)
connection
- the connection to associate withpublic RemotingConnectionEJBReceiver(Connection connection, ReconnectHandler reconnectHandler, OptionMap channelCreationOptions)
connection
- the connection to associate withreconnectHandler
- The ReconnectHandler
to use when the connection breakschannelCreationOptions
- The options
to be used during channel creationpublic void associate(EJBReceiverContext context)
EJBReceiver
associate
in class EJBReceiver
context
- the receiver contextpublic void processInvocation(EJBClientInvocationContext clientInvocationContext, EJBReceiverInvocationContext ejbReceiverInvocationContext) throws Exception
EJBReceiver
processInvocation
in class EJBReceiver
clientInvocationContext
- the interceptor clientInvocationContextejbReceiverInvocationContext
- The EJB receiver invocation contextException
- if the operation throws an exceptionprotected <T> StatefulEJBLocator<T> openSession(EJBReceiverContext receiverContext, Class<T> viewType, String appName, String moduleName, String distinctName, String beanName) throws IllegalArgumentException
EJBReceiver
StatefulEJBLocator
representing the newly created session.openSession
in class EJBReceiver
receiverContext
- The receiver contextviewType
- View classappName
- The application namemoduleName
- The module namedistinctName
- The distinct namebeanName
- The name of the beanIllegalArgumentException
- If the session creation request is made for a bean which is not a stateful
session bean.public boolean exists(String appName, String moduleName, String distinctName, String beanName)
EJBReceiver
exists
in class EJBReceiver
appName
- The application namemoduleName
- The module namedistinctName
- The distinct namebeanName
- The bean nameprotected void sendCommit(EJBReceiverContext receiverContext, TransactionID transactionID, boolean onePhase) throws XAException
EJBReceiver
sendCommit
in class EJBReceiver
receiverContext
- the receiver contexttransactionID
- the transaction IDonePhase
- true
to perform a one-phase commitXAException
- if the transaction commit failedprotected void sendRollback(EJBReceiverContext receiverContext, TransactionID transactionID) throws XAException
EJBReceiver
sendRollback
in class EJBReceiver
receiverContext
- the receiver contexttransactionID
- the transaction IDXAException
- if the transaction rollback failedprotected int sendPrepare(EJBReceiverContext receiverContext, TransactionID transactionID) throws XAException
EJBReceiver
sendPrepare
in class EJBReceiver
receiverContext
- the receiver contexttransactionID
- the transaction IDXA_RDONLY
or XA_OK
XAException
- to roll back the transactionprotected void sendForget(EJBReceiverContext receiverContext, TransactionID transactionID) throws XAException
EJBReceiver
sendForget
in class EJBReceiver
receiverContext
- the receiver contexttransactionID
- the transaction IDXAException
- if the forget message failedprotected void beforeCompletion(EJBReceiverContext receiverContext, TransactionID transactionID)
EJBReceiver
beforeCompletion
in class EJBReceiver
receiverContext
- the receiver contexttransactionID
- the transaction IDCopyright © 2012 JBoss by Red Hat. All Rights Reserved.