org.jboss.proxy.ejb.handle
Class StatefulHandleImpl

java.lang.Object
  extended byorg.jboss.proxy.ejb.handle.StatefulHandleImpl
All Implemented Interfaces:
Handle (src) , java.io.Serializable

public class StatefulHandleImpl
extends java.lang.Object
implements Handle (src)

An EJB stateful session bean handle.

See Also:
Serialized Form

Field Summary
protected static java.lang.reflect.Method GET_EJB_OBJECT
          A reference to Handle.getEJBObject().
 java.lang.Object id
           
 Invoker (src) invoker
           
 java.lang.String invokerProxyBinding
           
 java.lang.String jndiName
           
 int objectName
          The identity of the bean.
 
Constructor Summary
StatefulHandleImpl(int objectName, java.lang.String jndiName, Invoker (src)  invoker, java.lang.String invokerProxyBinding, java.lang.Object id, java.lang.Object invokerID)
          Create an ejb handle for a stateful session bean.
 
Method Summary
 EJBObject (src) getEJBObject()
          Handle implementation.
 java.lang.Object getID()
           
 java.lang.String getJNDIName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GET_EJB_OBJECT

protected static final java.lang.reflect.Method GET_EJB_OBJECT
A reference to Handle.getEJBObject().


objectName

public int objectName
The identity of the bean.


jndiName

public java.lang.String jndiName

invokerProxyBinding

public java.lang.String invokerProxyBinding

invoker

public Invoker (src)  invoker

id

public java.lang.Object id
Constructor Detail

StatefulHandleImpl

public StatefulHandleImpl(int objectName,
                          java.lang.String jndiName,
                          Invoker (src)  invoker,
                          java.lang.String invokerProxyBinding,
                          java.lang.Object id,
                          java.lang.Object invokerID)
Create an ejb handle for a stateful session bean.

Parameters:
objectName - - the session container jmx name
jndiName - - the session home ejb name
invoker - - the invoker to request the EJBObject from
invokerProxyBinding - - the type of invoker binding
id - - the session id
Method Detail

getID

public java.lang.Object getID()
Returns:
the internal session identifier

getJNDIName

public java.lang.String getJNDIName()
Returns:
the jndi name

getEJBObject

public EJBObject (src)  getEJBObject()
                       throws java.rmi.RemoteException
Handle implementation. This differs from Stateless and Entity handles which just invoke standard methods (create and findByPrimaryKey respectively) on the Home interface (proxy). There is no equivalent option for stateful SBs, so a direct invocation on the container has to be made to locate the bean by its id (the stateful SB container provides an implementation of getEJBObject). This means the security context has to be set here just as it would be in the Proxy.

Specified by:
getEJBObject in interface Handle (src)
Returns:
EJBObject reference.
Throws:
java.rmi.ServerException - Could not get EJBObject.
java.rmi.RemoteException - - The EJB object could not be obtained because of a system-level failure.