|
JBoss EJB client 2.0.0.Beta4 | |||||||||
| 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.EJBReceiver
org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver
public final class RemotingConnectionEJBReceiver
A EJBReceiver which uses JBoss Remoting to communicate with the server for EJB invocations
| Field Summary | |
|---|---|
static String |
HTTP_REMOTING
|
static String |
HTTPS_REMOTING
|
static String |
REMOTE
|
| Constructor Summary | |
|---|---|
RemotingConnectionEJBReceiver(org.jboss.remoting3.Connection connection)
Deprecated. Since 2.0.0. Use RemotingConnectionEJBReceiver(org.jboss.remoting3.Connection, String) instead |
|
RemotingConnectionEJBReceiver(org.jboss.remoting3.Connection connection,
ReconnectHandler reconnectHandler,
org.xnio.OptionMap channelCreationOptions)
Deprecated. Since 2.0.0. Use RemotingConnectionEJBReceiver(org.jboss.remoting3.Connection, ReconnectHandler, org.xnio.OptionMap, String) instead |
|
RemotingConnectionEJBReceiver(org.jboss.remoting3.Connection connection,
ReconnectHandler reconnectHandler,
org.xnio.OptionMap channelCreationOptions,
String remotingProtocol)
Construct a new instance. |
|
RemotingConnectionEJBReceiver(org.jboss.remoting3.Connection connection,
String remotingProtocol)
Construct a new instance. |
|
| Method Summary | ||
|---|---|---|
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. |
|
protected boolean |
cancelInvocation(EJBClientInvocationContext clientInvocationContext,
EJBReceiverInvocationContext receiverInvocationContext)
Send an invocation cancellation message over the remoting channel, for the invocation corresponding to the passed EJB receiver invocation context. |
|
boolean |
exists(String appName,
String moduleName,
String distinctName,
String beanName)
Verify the existence of a remote EJB. |
|
protected
|
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 Xid[] |
sendRecover(EJBReceiverContext receiverContext,
String txParentNodeName,
int recoveryFlags)
Send a transaction recover message with the recoveryFlags. |
|
protected void |
sendRollback(EJBReceiverContext receiverContext,
TransactionID transactionID)
Send a transaction-rollback message for the given transaction ID. |
|
String |
toString()
|
|
| Methods inherited from class org.jboss.ejb.client.EJBReceiver |
|---|
deregisterModule, getNodeName, registerModule |
| 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, wait, wait, wait |
| Field Detail |
|---|
public static final String REMOTE
public static final String HTTP_REMOTING
public static final String HTTPS_REMOTING
| Constructor Detail |
|---|
public RemotingConnectionEJBReceiver(org.jboss.remoting3.Connection connection,
String remotingProtocol)
connection - the connection to associate withremotingProtocol - the remoting protocol in use@Deprecated public RemotingConnectionEJBReceiver(org.jboss.remoting3.Connection connection)
RemotingConnectionEJBReceiver(org.jboss.remoting3.Connection, String) instead
connection - the connection to associate with
@Deprecated
public RemotingConnectionEJBReceiver(org.jboss.remoting3.Connection connection,
ReconnectHandler reconnectHandler,
org.xnio.OptionMap channelCreationOptions)
RemotingConnectionEJBReceiver(org.jboss.remoting3.Connection, ReconnectHandler, org.xnio.OptionMap, String) instead
connection - the connection to associate withreconnectHandler - The ReconnectHandler to use when the connection breakschannelCreationOptions - The options to be used during channel creation
public RemotingConnectionEJBReceiver(org.jboss.remoting3.Connection connection,
ReconnectHandler reconnectHandler,
org.xnio.OptionMap channelCreationOptions,
String remotingProtocol)
connection - the connection to associate withreconnectHandler - The ReconnectHandler to use when the connection breakschannelCreationOptions - The options to be used during channel creationremotingProtocol - | Method Detail |
|---|
public void associate(EJBReceiverContext context)
EJBReceiver
associate in class EJBReceivercontext - the receiver context
public void processInvocation(EJBClientInvocationContext clientInvocationContext,
EJBReceiverInvocationContext ejbReceiverInvocationContext)
throws Exception
EJBReceiver
processInvocation in class EJBReceiverclientInvocationContext - the interceptor clientInvocationContextejbReceiverInvocationContext - The EJB receiver invocation context
Exception - if the operation throws an exception
protected <T> StatefulEJBLocator<T> openSession(EJBReceiverContext receiverContext,
Class<T> viewType,
String appName,
String moduleName,
String distinctName,
String beanName)
throws IllegalArgumentException
EJBReceiverStatefulEJBLocator representing the newly created session.
openSession in class EJBReceiverreceiverContext - The receiver contextviewType - View classappName - The application namemoduleName - The module namedistinctName - The distinct namebeanName - The name of the bean
IllegalArgumentException - 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 EJBReceiverappName - The application namemoduleName - The module namedistinctName - The distinct namebeanName - The bean name
protected void sendCommit(EJBReceiverContext receiverContext,
TransactionID transactionID,
boolean onePhase)
throws XAException
EJBReceiver
sendCommit in class EJBReceiverreceiverContext - the receiver contexttransactionID - the transaction IDonePhase - true to perform a one-phase commit
XAException - if the transaction commit failed
protected void sendRollback(EJBReceiverContext receiverContext,
TransactionID transactionID)
throws XAException
EJBReceiver
sendRollback in class EJBReceiverreceiverContext - the receiver contexttransactionID - the transaction ID
XAException - if the transaction rollback failed
protected int sendPrepare(EJBReceiverContext receiverContext,
TransactionID transactionID)
throws XAException
EJBReceiver
sendPrepare in class EJBReceiverreceiverContext - the receiver contexttransactionID - the transaction ID
XA_RDONLY
or XA_OK
XAException - to roll back the transaction
protected void sendForget(EJBReceiverContext receiverContext,
TransactionID transactionID)
throws XAException
EJBReceiver
sendForget in class EJBReceiverreceiverContext - the receiver contexttransactionID - the transaction ID
XAException - if the forget message failed
protected Xid[] sendRecover(EJBReceiverContext receiverContext,
String txParentNodeName,
int recoveryFlags)
throws XAException
EJBReceiverrecoveryFlags. The receiver is expected to
returns zero or more Xids of the transaction branches that are currently in a prepared or heuristically completed state.
See XAResource.recover(int) for more details.
sendRecover in class EJBReceiverreceiverContext - The EJB receiver contextrecoveryFlags - @see XAResource.recover(int)
Xids of the transaction branches that are currently in a prepared or heuristically completed state.
XAException - If an error occurs during the operation
protected void beforeCompletion(EJBReceiverContext receiverContext,
TransactionID transactionID)
EJBReceiver
beforeCompletion in class EJBReceiverreceiverContext - the receiver contexttransactionID - the transaction ID
protected boolean cancelInvocation(EJBClientInvocationContext clientInvocationContext,
EJBReceiverInvocationContext receiverInvocationContext)
EJB receiver invocation context. This method does not
wait or expect an "result" back from the server. Instead this method just returns back false
after sending the cancellation request.
cancelInvocation in class EJBReceiverclientInvocationContext - the client invocation context for which the invocation is being cancelledreceiverInvocationContext - the receiver invocation context for which the invocation is being cancelled
EJBReceiver#cancelInvocation(org.jboss.ejb.client.EJBClientInvocationContext, org.jboss.ejb.client.EJBReceiverInvocationContext)}public String toString()
toString in class Object
|
JBoss EJB client 2.0.0.Beta4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||