org.ow2.jonas.lib.ejb21
Class JEntityRemote

java.lang.Object
  extended by javax.rmi.PortableRemoteObject
      extended by org.ow2.jonas.lib.ejb21.JRemote
          extended by org.ow2.jonas.lib.ejb21.JEntityRemote
All Implemented Interfaces:
Remote, EJBObject
Direct Known Subclasses:
JRepEntityRemote

public abstract class JEntityRemote
extends JRemote
implements Remote

Generic part of the EJBObject implementation

Author:
Philippe Coq, Philippe Durieux

Field Summary
protected  JEntitySwitch bs
           
protected  JEntityFactory ebf
           
 
Fields inherited from class org.ow2.jonas.lib.ejb21.JRemote
bf
 
Constructor Summary
JEntityRemote(JEntityFactory bf)
          constructor
 
Method Summary
 void checkSecurity(EJBInvocation ejbInv)
          Check if the access to the bean is authorized
 EJBHome getEJBHome()
           
 Object getPrimaryKey()
           
 boolean isIdentical(EJBObject obj)
          Tests if a given EJB is identical to the invoked EJB object.
 void postInvoke(RequestCtx rctx)
          postInvoke is called after any request.
 RequestCtx preInvoke(int txa)
          preInvoke is called before any request.
 void setEntitySwitch(JEntitySwitch bs)
          finish initialization
 
Methods inherited from class org.ow2.jonas.lib.ejb21.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
 
Methods inherited from interface javax.ejb.EJBObject
getHandle, remove
 

Field Detail

ebf

protected JEntityFactory ebf

bs

protected JEntitySwitch bs
Constructor Detail

JEntityRemote

public JEntityRemote(JEntityFactory bf)
              throws RemoteException
constructor

Parameters:
bf - The Entity Factory
Throws:
RemoteException
Method Detail

setEntitySwitch

public void setEntitySwitch(JEntitySwitch bs)
finish initialization

Parameters:
bs - The Entity Bean Switch

getEJBHome

public EJBHome getEJBHome()
Specified by:
getEJBHome in interface EJBObject
Returns:
the enterprise Bean's home interface.

getPrimaryKey

public Object getPrimaryKey()
Specified by:
getPrimaryKey in interface EJBObject
Returns:
the Primary Key for this EJBObject
Throws:
EJBException - Bean has no primary key yet.

isIdentical

public boolean isIdentical(EJBObject obj)
                    throws RemoteException
Tests if a given EJB is identical to the invoked EJB object.

Specified by:
isIdentical in interface EJBObject
Parameters:
obj - - An object to test for identity with the invoked object.
Returns:
True if the given EJB object is identical to the invoked object.
Throws:
RemoteException - Thrown when the method failed due to a system-level failure.

preInvoke

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

Parameters:
txa - Transaction Attribute (Supports, Required, ...)
Returns:
A RequestCtx object
Throws:
RemoteException

checkSecurity

public void checkSecurity(EJBInvocation ejbInv)
Check if the access to the bean is authorized

Parameters:
ejbInv - object containing security signature of the method, args of method, etc

postInvoke

public void postInvoke(RequestCtx rctx)
                throws RemoteException
postInvoke is called after any request.

Parameters:
rctx - The RequestCtx that was returned at preInvoke()
Throws:
RemoteException


Copyright © 2010 OW2 Consortium. All Rights Reserved.