org.openejb.core.entity
Class EntityEjbHomeHandler

java.lang.Object
  extended by org.openejb.core.ivm.BaseEjbProxyHandler
      extended by org.openejb.core.ivm.EjbHomeProxyHandler
          extended by org.openejb.core.entity.EntityEjbHomeHandler
All Implemented Interfaces:
java.io.Serializable, InvocationHandler

public class EntityEjbHomeHandler
extends EjbHomeProxyHandler

This InvocationHandler and its proxy are serializable and can be used by HomeHandle, Handle, and MetaData to persist and revive handles. It maintains its original client identity which allows the container to be more discerning about allowing the revieed proxy to be used. See StatefulContaer manager for more details.

Author:
David Blevins, Richard Monson-Haefel
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.openejb.core.ivm.EjbHomeProxyHandler
logger
 
Fields inherited from class org.openejb.core.ivm.BaseEjbProxyHandler
container, deploymentID, deploymentInfo, doIntraVmCopy, inProxyMap, isInvalidReference, liveHandleRegistry, primaryKey
 
Constructor Summary
EntityEjbHomeHandler(RpcContainer container, java.lang.Object pk, java.lang.Object depID)
           
 
Method Summary
protected  java.lang.Object createProxy(ProxyInfo proxyInfo)
           
protected  java.lang.Object findX(java.lang.reflect.Method method, java.lang.Object[] args, java.lang.Object proxy)
           Locates and returns a new EJBObject or a collection of EJBObjects.
protected  EjbObjectProxyHandler newEjbObjectHandler(RpcContainer container, java.lang.Object pk, java.lang.Object depID)
           
protected  java.lang.Object removeByPrimaryKey(java.lang.reflect.Method method, java.lang.Object[] args, java.lang.Object proxy)
           Attempts to remove an EJBObject from the container system.
 
Methods inherited from class org.openejb.core.ivm.EjbHomeProxyHandler
_invoke, _writeReplace, create, getEJBMetaData, getHomeHandle, getProxyInfo, invalidateReference, removeWithHandle
 
Methods inherited from class org.openejb.core.ivm.BaseEjbProxyHandler
checkAuthorization, copyArgs, copyObj, equals, getThreadSpecificSecurityIdentity, hashCode, invalidateAllHandlers, invoke, isLocal, registerHandler, setIntraVmCopyMode, setLocal, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EntityEjbHomeHandler

public EntityEjbHomeHandler(RpcContainer container,
                            java.lang.Object pk,
                            java.lang.Object depID)
Method Detail

createProxy

protected java.lang.Object createProxy(ProxyInfo proxyInfo)
Overrides:
createProxy in class EjbHomeProxyHandler

findX

protected java.lang.Object findX(java.lang.reflect.Method method,
                                 java.lang.Object[] args,
                                 java.lang.Object proxy)
                          throws java.lang.Throwable

Locates and returns a new EJBObject or a collection of EJBObjects. The EJBObject(s) is a new proxy with a new handler. This implementation should not be sent outside the virtual machine.

This method propogates to the container system.

The find method is required to be defined by the bean's home interface of Entity beans.

Specified by:
findX in class EjbHomeProxyHandler
Parameters:
method -
args -
proxy -
Returns:
Returns an new EJBObject proxy and handler
Throws:
java.lang.Throwable

removeByPrimaryKey

protected java.lang.Object removeByPrimaryKey(java.lang.reflect.Method method,
                                              java.lang.Object[] args,
                                              java.lang.Object proxy)
                                       throws java.lang.Throwable

Attempts to remove an EJBObject from the container system. The EJBObject to be removed is represented by the primaryKey passed into the remove method of the EJBHome.

This method propogates to the container system.

remove(Object primary) is a method of javax.ejb.EJBHome

Checks if the caller is authorized to invoke the javax.ejb.EJBHome.remove on the EJBHome of the deployment.

Specified by:
removeByPrimaryKey in class EjbHomeProxyHandler
Parameters:
method -
args -
Returns:
Returns null
Throws:
java.lang.Throwable
See Also:
EJBHome, EJBHome.remove(javax.ejb.Handle)

newEjbObjectHandler

protected EjbObjectProxyHandler newEjbObjectHandler(RpcContainer container,
                                                    java.lang.Object pk,
                                                    java.lang.Object depID)
Specified by:
newEjbObjectHandler in class EjbHomeProxyHandler


Copyright © 1999-2011 OpenEJB. All Rights Reserved.