|
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.EJBReceiver
public abstract class EJBReceiver
A receiver for EJB invocations. Receivers can be associated with one or more client contexts. This interface is implemented by providers for EJB invocation services.
Constructor Summary | |
---|---|
EJBReceiver(String nodeName)
|
Method Summary | ||
---|---|---|
protected abstract void |
associate(EJBReceiverContext context)
Handle the association of this EJB receiver with the EJB client context. |
|
protected void |
beforeCompletion(EJBReceiverContext context,
TransactionID transactionID)
The before-completion hook. |
|
protected boolean |
cancelInvocation(EJBClientInvocationContext clientInvocationContext,
EJBReceiverInvocationContext receiverContext)
Attempt to cancel an invocation. |
|
protected boolean |
deregisterModule(String appName,
String moduleName,
String distinctName)
Deregister a module from this receiver. |
|
protected abstract boolean |
exists(String appName,
String moduleName,
String distinctName,
String beanName)
Verify the existence of a remote EJB. |
|
protected String |
getNodeName()
Returns the node name corresponding to this receiver. |
|
protected abstract
|
openSession(EJBReceiverContext context,
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. |
|
protected abstract void |
processInvocation(EJBClientInvocationContext clientInvocationContext,
EJBReceiverInvocationContext receiverContext)
Process the invocation. |
|
protected boolean |
registerModule(String appName,
String moduleName,
String distinctName)
Register a new module to this receiver. |
|
protected void |
sendCommit(EJBReceiverContext context,
TransactionID transactionID,
boolean onePhase)
Send a transaction-commit message for the given transaction ID. |
|
protected void |
sendForget(EJBReceiverContext context,
TransactionID transactionID)
Send a transaction-forget message for the given transaction ID. |
|
protected int |
sendPrepare(EJBReceiverContext context,
TransactionID transactionID)
Send a transaction-prepare message for the given transaction ID. |
|
protected void |
sendRollback(EJBReceiverContext context,
TransactionID transactionID)
Send a transaction-rollback message for the given transaction ID. |
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 EJBReceiver(String nodeName)
Method Detail |
---|
protected final boolean registerModule(String appName, String moduleName, String distinctName)
appName
- the app namemoduleName
- the module namedistinctName
- the distinct name
true
if this is a previously-unknown registrationprotected final boolean deregisterModule(String appName, String moduleName, String distinctName)
appName
- the app namemoduleName
- the module namedistinctName
- the distinct name
true
if the registration was presentprotected abstract void associate(EJBReceiverContext context)
context
- the receiver contextprotected abstract void processInvocation(EJBClientInvocationContext clientInvocationContext, EJBReceiverInvocationContext receiverContext) throws Exception
clientInvocationContext
- the interceptor clientInvocationContextreceiverContext
- The EJB receiver invocation context
Exception
- if the operation throws an exceptionprotected boolean cancelInvocation(EJBClientInvocationContext clientInvocationContext, EJBReceiverInvocationContext receiverContext)
false
if
it cannot be discovered.
clientInvocationContext
- the original clientInvocationContextreceiverContext
- the EJB receiver invocation context
true
if the operation was definitely cancelled immediately, false
otherwiseprotected abstract <T> StatefulEJBLocator<T> openSession(EJBReceiverContext context, Class<T> viewType, String appName, String moduleName, String distinctName, String beanName) throws IllegalArgumentException
StatefulEJBLocator
representing the newly created session.
T
- context
- 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.protected abstract boolean exists(String appName, String moduleName, String distinctName, String beanName)
appName
- The application namemoduleName
- The module namedistinctName
- The distinct namebeanName
- The bean nameprotected int sendPrepare(EJBReceiverContext context, TransactionID transactionID) throws XAException
context
- the receiver contexttransactionID
- the transaction ID
XA_RDONLY
or XA_OK
XAException
- to roll back the transactionprotected void sendCommit(EJBReceiverContext context, TransactionID transactionID, boolean onePhase) throws XAException
context
- the receiver contexttransactionID
- the transaction IDonePhase
- true
to perform a one-phase commit
XAException
- if the transaction commit failedprotected void sendRollback(EJBReceiverContext context, TransactionID transactionID) throws XAException
context
- the receiver contexttransactionID
- the transaction ID
XAException
- if the transaction rollback failedprotected void sendForget(EJBReceiverContext context, TransactionID transactionID) throws XAException
context
- the receiver contexttransactionID
- the transaction ID
XAException
- if the forget message failedprotected final String getNodeName()
protected void beforeCompletion(EJBReceiverContext context, TransactionID transactionID)
context
- the receiver contexttransactionID
- the transaction ID
|
JBoss EJB client 1.0.5.Final | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |