org.ow2.jonas.lib.ejb21.ha
Class JRepStatefulLocal

java.lang.Object
  extended by org.ow2.jonas.lib.ejb21.JLocal
      extended by org.ow2.jonas.lib.ejb21.JSessionLocal
          extended by org.ow2.jonas.lib.ejb21.ha.JRepStatefulLocal
All Implemented Interfaces:
EJBLocalObject

public abstract class JRepStatefulLocal
extends JSessionLocal

Generic part of the EJBObject implementation for replicated SFSBs

Author:
Francisco Perez-Sorrosal (fpsorrosal@no-spam@fi.upm.es), Alberto Paz-Jimenez (apaz@no-spam@fi.upm.es)

Field Summary
 org.ow2.cmi.ha.SessionId clusterOId
           
protected static org.objectweb.util.monolog.api.Logger cmilogger
          Logger for traces
 
Fields inherited from class org.ow2.jonas.lib.ejb21.JSessionLocal
bf, bs
 
Constructor Summary
JRepStatefulLocal(JSessionFactory bf)
          constructor
 
Method Summary
 org.ow2.cmi.ha.SessionId getClusterOId()
          Gets the clusterOId
protected  void injectState()
          Injects the state of the bean if the cluster object id received in the request is in the current node.
 void postInvoke(RequestCtx rctx, boolean remove)
          postInvoke is called after any request.
 RequestCtx preInvoke(int txa)
          preInvoke is called before any request.
 void setClusterOId(org.ow2.cmi.ha.SessionId oid)
          Sets the clusterOId
 
Methods inherited from class org.ow2.jonas.lib.ejb21.JSessionLocal
checkSecurity, getEJBLocalHome, getPrimaryKey, getSessionSwitch, isIdentical, postInvoke, remove, setSessionSwitch
 
Methods inherited from class org.ow2.jonas.lib.ejb21.JLocal
exportObject, unexportObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cmilogger

protected static org.objectweb.util.monolog.api.Logger cmilogger
Logger for traces


clusterOId

public org.ow2.cmi.ha.SessionId clusterOId
Constructor Detail

JRepStatefulLocal

public JRepStatefulLocal(JSessionFactory bf)
constructor

Parameters:
bf - The Session Factory
Throws:
Exception
Method Detail

preInvoke

public RequestCtx preInvoke(int txa)
preInvoke is called before any request.

Overrides:
preInvoke in class JSessionLocal
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,
                       boolean remove)
postInvoke is called after any request.

Parameters:
rctx - The RequestCtx that was returned at preInvoke()
remove - TODO
response - 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.

injectState

protected void injectState()
Injects the state of the bean if the cluster object id received in the request is in the current node. It extracts the object id passed through the interceptors from the request id included in the current HA context.


getClusterOId

public org.ow2.cmi.ha.SessionId getClusterOId()
Gets the clusterOId

Returns:
the clusterOid

setClusterOId

public void setClusterOId(org.ow2.cmi.ha.SessionId oid)
Sets the clusterOId

Parameters:
oid -


Copyright © 2010 OW2 Consortium. All Rights Reserved.