org.objectweb.jonas_ejb.container
Class JRepStatelessRemote

java.lang.Object
  extended byjavax.rmi.PortableRemoteObject
      extended byorg.objectweb.jonas_ejb.container.JRemote
          extended byorg.objectweb.jonas_ejb.container.JSessionRemote
              extended byorg.objectweb.jonas_ejb.container.JRepStatelessRemote
All Implemented Interfaces:
javax.ejb.EJBObject, java.rmi.Remote

public abstract class JRepStatelessRemote
extends JSessionRemote

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
 
Fields inherited from class org.objectweb.jonas_ejb.container.JSessionRemote
bs
 
Fields inherited from class org.objectweb.jonas_ejb.container.JRemote
bf
 
Constructor Summary
JRepStatelessRemote(JSessionFactory bf)
          Constructor
 
Method Summary
protected  java.lang.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, java.lang.Object response)
          postInvoke is called after any request.
 RequestCtx preInvoke(int txa)
          preInvoke is called before any request.
 
Methods inherited from class org.objectweb.jonas_ejb.container.JSessionRemote
checkSecurity, getEJBHome, getHandle, getPrimaryKey, getSessionSwitch, isIdentical, postInvoke, remove, setSessionSwitch
 
Methods inherited from class org.objectweb.jonas_ejb.container.JRemote
exportObject, getBf, unexportObject
 
Methods inherited from class javax.rmi.PortableRemoteObject
connect, exportObject, narrow, toStub, unexportObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JRepStatelessRemote

public JRepStatelessRemote(JSessionFactory bf)
                    throws java.rmi.RemoteException
Constructor

Parameters:
bf -
Throws:
java.rmi.RemoteException
Method Detail

preInvoke

public RequestCtx preInvoke(int txa)
                     throws java.rmi.RemoteException
preInvoke is called before any request.

Overrides:
preInvoke in class JSessionRemote
Parameters:
txa - Transaction Attribute (Supports, Required, ...)
Returns:
A RequestCtx object
Throws:
java.rmi.RemoteException - Thrown when the method failed due to a system-level failure.

postInvoke

public void postInvoke(RequestCtx rctx,
                       java.lang.Object response)
                throws java.rmi.RemoteException
postInvoke is called after any request.

Parameters:
rctx - The RequestCtx that was returned at preInvoke()
Throws:
java.rmi.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 rquest id have an associated response

getResponse

protected java.lang.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