org.ow2.jonas.lib.ejb21
Class JSessionLocal

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

public abstract class JSessionLocal
extends JLocal

Generic part of the EJBLocalObject implementation

Author:
Philippe Durieux

Field Summary
protected  JSessionFactory bf
           
protected  JSessionSwitch bs
           
 
Constructor Summary
JSessionLocal(JSessionFactory bf)
          constructor
 
Method Summary
 void checkSecurity(EJBInvocation ejbInv)
          Check if the access to the bean is authorized
 EJBLocalHome getEJBLocalHome()
           
 Object getPrimaryKey()
           
 JSessionSwitch getSessionSwitch()
           
 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()
           
 void setSessionSwitch(JSessionSwitch 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 JSessionFactory bf

bs

protected JSessionSwitch bs
Constructor Detail

JSessionLocal

public JSessionLocal(JSessionFactory bf)
constructor

Parameters:
bf - The Session Factory
Method Detail

remove

public abstract void remove()
                     throws RemoveException
Throws:
RemoveException

getEJBLocalHome

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

getPrimaryKey

public Object getPrimaryKey()
                     throws EJBException
Returns:
the Primary Key for this EJBObject
Throws:
EJBException - Always : Session bean has no primary key

isIdentical

public boolean isIdentical(EJBLocalObject obj)
Tests if a given EJB is identical to the invoked EJB object. This is different whether the bean is stateless or stateful.

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.

setSessionSwitch

public void setSessionSwitch(JSessionSwitch bs)
finish initialization

Parameters:
bs - The Session Switch

getSessionSwitch

public JSessionSwitch getSessionSwitch()
Returns:
the JSessionSwitch for this Session

preInvoke

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

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

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()
Throws:
EJBException


Copyright © 2010 OW2 Consortium. All Rights Reserved.