org.openejb.core.entity
Class EntityEjbObjectHandler

java.lang.Object
  |
  +--org.openejb.core.ivm.BaseEjbProxyHandler
        |
        +--org.openejb.core.ivm.EjbObjectProxyHandler
              |
              +--org.openejb.core.entity.EntityEjbObjectHandler
All Implemented Interfaces:
InvocationHandler, java.io.Serializable

public class EntityEjbObjectHandler
extends EjbObjectProxyHandler

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.

See Also:
Serialized Form

Field Summary
 java.lang.Object registryId
           
 
Fields inherited from class org.openejb.core.ivm.BaseEjbProxyHandler
container, debug, deploymentID, deploymentInfo, doIntraVmCopy, inProxyMap, isInvalidReference, liveHandleRegistry, primaryKey
 
Constructor Summary
EntityEjbObjectHandler(RpcContainer container, java.lang.Object pk, java.lang.Object depID)
           
 
Method Summary
protected  java.lang.Object getPrimaryKey(java.lang.reflect.Method method, java.lang.Object[] args, java.lang.Object proxy)
           
 java.lang.Object getRegistryId()
          The Registry id is a logical identifier that is used as a key when placing EjbObjectProxyHanlders into the BaseEjbProxyHanlder's liveHandleRegistry.
static java.lang.Object getRegistryId(java.lang.Object primKey, java.lang.Object deployId, Container contnr)
           
protected  java.lang.Object isIdentical(java.lang.reflect.Method method, java.lang.Object[] args, java.lang.Object proxy)
          Entity beans are uniquely identifed by primary key, deloyment id, and the container they are running in.
protected  java.lang.Object remove(java.lang.reflect.Method method, java.lang.Object[] args, java.lang.Object proxy)
           
 
Methods inherited from class org.openejb.core.ivm.EjbObjectProxyHandler
_invoke, _writeReplace, businessMethod, getEJBHome, getHandle, getProxyInfo
 
Methods inherited from class org.openejb.core.ivm.BaseEjbProxyHandler
, checkAuthorization, copyArgs, copyObj, getThreadSpecificSecurityIdentity, invalidateAllHandlers, invalidateReference, invoke, log, registerHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

registryId

public java.lang.Object registryId
Constructor Detail

EntityEjbObjectHandler

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

getRegistryId

public static java.lang.Object getRegistryId(java.lang.Object primKey,
                                             java.lang.Object deployId,
                                             Container contnr)

getRegistryId

public java.lang.Object getRegistryId()
The Registry id is a logical identifier that is used as a key when placing EjbObjectProxyHanlders into the BaseEjbProxyHanlder's liveHandleRegistry. EjbObjectProxyHanlders that represent the same bean identity (keyed by the registry id) will be stored together so that they can be removed together when the BaseEjbProxyHandler.invalidateAllHandlers is invoked. This method is implemented by the subclasses to return an id that logically identifies bean identity for a specific deployment id and container. The EntityEjbObjectHandler overrides this method to return a compound key composed of the bean's primary key, deployment id, and container id. This uniquely identifies the bean identity that is proxied by this handler.
Overrides:
getRegistryId in class EjbObjectProxyHandler

getPrimaryKey

protected java.lang.Object getPrimaryKey(java.lang.reflect.Method method,
                                         java.lang.Object[] args,
                                         java.lang.Object proxy)
                                  throws java.lang.Throwable
Overrides:
getPrimaryKey in class EjbObjectProxyHandler

isIdentical

protected java.lang.Object isIdentical(java.lang.reflect.Method method,
                                       java.lang.Object[] args,
                                       java.lang.Object proxy)
                                throws java.lang.Throwable
Entity beans are uniquely identifed by primary key, deloyment id, and the container they are running in.
Overrides:
isIdentical in class EjbObjectProxyHandler
Parameters:
method -  
args -  
proxy -  
Returns:
 
Throws:
java.lang.Throwable -  

remove

protected java.lang.Object remove(java.lang.reflect.Method method,
                                  java.lang.Object[] args,
                                  java.lang.Object proxy)
                           throws java.lang.Throwable
Overrides:
remove in class EjbObjectProxyHandler