org.objectweb.jonas_ejb.container
Class JSessionHome

java.lang.Object
  extended by javax.rmi.PortableRemoteObject
      extended by org.objectweb.jonas_ejb.container.JHome
          extended by org.objectweb.jonas_ejb.container.JSessionHome
All Implemented Interfaces:
java.rmi.Remote, javax.ejb.EJBHome
Direct Known Subclasses:
JRepStatefulHome, JRepStatelessHome

public abstract class JSessionHome
extends JHome
implements java.rmi.Remote

This class is the Standard Home for Session objects It exists only for beans that have declared a Remote Interface. It implements javax.ejb.EJBHome interface (by the inherited class JHome) It implements a pool of EJBObject's

Author:
Philippe Durieux

Field Summary
 
Fields inherited from class org.objectweb.jonas_ejb.container.JHome
bf, dd, ejbMetaData, unregistered
 
Constructor Summary
JSessionHome(SessionDesc dd, JSessionFactory bf)
          constructor
 
Method Summary
abstract  JSessionRemote createRemoteObject()
          Creates the EJBObject (remote) this is in the generated class because it is mainly "new objectClass()"
 java.rmi.Remote getRemoteOrRemoteStub(java.rmi.Remote remote)
          Get the remote object as a stub object for CMI remote object LB
 void postInvoke(RequestCtx rctx)
          postInvoke is called after any request.
 RequestCtx preInvoke(int txa)
          preInvoke is called before any request.
 void remove(java.lang.Object pk)
          remove(pk) is not allowed for session beans
 
Methods inherited from class org.objectweb.jonas_ejb.container.JHome
checkSecurity, getBf, getDd, getEJBMetaData, getHomeHandle, getJndiName, register, remove, unregister
 
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

JSessionHome

public JSessionHome(SessionDesc dd,
                    JSessionFactory bf)
             throws java.rmi.RemoteException
constructor

Parameters:
dd - The Session Bean Deployment Descriptor
bf - THe Session Bean Factory
Throws:
java.rmi.RemoteException
Method Detail

preInvoke

public RequestCtx preInvoke(int txa)
                     throws java.rmi.RemoteException
Description copied from class: JHome
preInvoke is called before any request.

Overrides:
preInvoke in class JHome
Parameters:
txa - Transaction Attribute (Supports, Required, ...)
Returns:
A RequestCtx object
Throws:
java.rmi.RemoteException - unexpected exception in preinvoke

postInvoke

public void postInvoke(RequestCtx rctx)
                throws java.rmi.RemoteException
Description copied from class: JHome
postInvoke is called after any request.

Overrides:
postInvoke in class JHome
Parameters:
rctx - The RequestCtx that was returned at preInvoke()
Throws:
java.rmi.RemoteException - unexpected exception in postinvoke

remove

public void remove(java.lang.Object pk)
            throws java.rmi.RemoteException,
                   javax.ejb.RemoveException
remove(pk) is not allowed for session beans

Specified by:
remove in interface javax.ejb.EJBHome
Specified by:
remove in class JHome
Parameters:
pk - the primary key
Throws:
javax.ejb.RemoveException - Always.
java.rmi.RemoteException - exception

createRemoteObject

public abstract JSessionRemote createRemoteObject()
                                           throws java.rmi.RemoteException
Creates the EJBObject (remote) this is in the generated class because it is mainly "new objectClass()"

Returns:
A JSessionRemote object
Throws:
java.rmi.RemoteException

getRemoteOrRemoteStub

public java.rmi.Remote getRemoteOrRemoteStub(java.rmi.Remote remote)
                                      throws java.rmi.NoSuchObjectException
Get the remote object as a stub object for CMI remote object LB

Parameters:
remote - remote object
Returns:
get remote object
Throws:
java.rmi.NoSuchObjectException - if the clustered object is not found in the CMI registry