org.ow2.jonas.lib.ejb21.ha
Class JRepStatelessRemote
java.lang.Object
javax.rmi.PortableRemoteObject
org.ow2.jonas.lib.ejb21.JRemote
org.ow2.jonas.lib.ejb21.JSessionRemote
org.ow2.jonas.lib.ejb21.ha.JRepStatelessRemote
- All Implemented Interfaces:
- Remote, EJBObject
public abstract class JRepStatelessRemote
- extends JSessionRemote
- implements Remote
Generic part of the EJBObject implementation for replicated SSBs
- Author:
- Francisco Perez-Sorrosal (fpsorrosal@no-spam@fi.upm.es), Alberto Paz-Jimenez (apaz@no-spam@fi.upm.es)
Field Summary |
protected static org.objectweb.util.monolog.api.Logger |
cmilogger
Logger for traces |
Fields inherited from class org.ow2.jonas.lib.ejb21.JRemote |
bf |
Method Summary |
protected Object |
getResponse()
Obtain the response associated with the current request id. |
protected boolean |
hasResponse()
Checks if there is a response associated with the current request id |
void |
postInvoke(RequestCtx rctx,
Object response)
postInvoke is called after any request. |
RequestCtx |
preInvoke(int txa)
preInvoke is called before any request. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cmilogger
protected static org.objectweb.util.monolog.api.Logger cmilogger
- Logger for traces
JRepStatelessRemote
public JRepStatelessRemote(JSessionFactory bf)
throws RemoteException
- Constructor
- Parameters:
bf
-
- Throws:
RemoteException
preInvoke
public RequestCtx preInvoke(int txa)
throws RemoteException
- preInvoke is called before any request.
- Overrides:
preInvoke
in class JSessionRemote
- Parameters:
txa
- Transaction Attribute (Supports, Required, ...)
- Returns:
- A RequestCtx object
- Throws:
RemoteException
- Thrown when the method failed due to a
system-level failure.
postInvoke
public void postInvoke(RequestCtx rctx,
Object response)
throws RemoteException
- postInvoke is called after any request.
- Parameters:
rctx
- The RequestCtx that was returned at preInvoke()remove
- TODOresponse
- The response that is going to be returned to the client
(Needed by HA)
- Throws:
RemoteException
- Thrown when the method failed due to a
system-level failure.
hasResponse
protected boolean hasResponse()
- Checks if there is a response associated with the current request id
- Returns:
- true if the current request id have an associated response
getResponse
protected Object getResponse()
- Obtain the response associated with the current request id.
Returns null if there is not response associated with the current requestId
IMPORTANT: This method remove the request id from the requests heap
- Returns:
- the response associated with the current request id
Copyright © 2010 OW2 Consortium. All Rights Reserved.