org.ow2.jonas.lib.ejb21
Class JEntityLocal

java.lang.Object
  extended by org.ow2.jonas.lib.ejb21.JLocal
      extended by org.ow2.jonas.lib.ejb21.JEntityLocal
All Implemented Interfaces:
EJBLocalObject
Direct Known Subclasses:
JRepEntityLocal

public abstract class JEntityLocal
extends JLocal

Generic part of the EJBLocalObject implementation

Author:
Philippe Durieux

Field Summary
protected  JEntityFactory bf
           
protected  JEntitySwitch bs
           
 
Constructor Summary
JEntityLocal(JEntityFactory bf)
          constructor
 
Method Summary
 void checkSecurity(EJBInvocation ejbInv)
          Check if the access to the bean is authorized
 EJBLocalHome getEJBLocalHome()
           
abstract  JWrapper getJWrapper()
          Get the JWrapper for serialization
 Object getPrimaryKey()
           
 boolean isIdentical(EJBLocalObject 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.
abstract  void remove()
          Remove this instance.
 void setEntitySwitch(JEntitySwitch bs)
          finish initialization
 
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

bf

protected JEntityFactory bf

bs

protected JEntitySwitch bs
Constructor Detail

JEntityLocal

public JEntityLocal(JEntityFactory bf)
constructor

Parameters:
bf - The Entity Factory
Method Detail

setEntitySwitch

public void setEntitySwitch(JEntitySwitch bs)
finish initialization

Parameters:
bs - The Entity Bean Switch

remove

public abstract void remove()
                     throws RemoveException
Remove this instance.

Throws:
RemoveException - Instance could not be removed.

getEJBLocalHome

public EJBLocalHome getEJBLocalHome()
Returns:
the enterprise Bean's local home interface.

getPrimaryKey

public Object getPrimaryKey()
Returns:
the Primary Key for this EJBLocalObject

isIdentical

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

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:
EJBException - Thrown when the method failed due to a system-level failure.

preInvoke

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

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

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)
postInvoke is called after any request.

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

getJWrapper

public abstract JWrapper getJWrapper()
Get the JWrapper for serialization

Returns:
the JWrapper


Copyright © 2010 OW2 Consortium. All Rights Reserved.