org.openejb.client
Class EntityEJBObjectHandler
java.lang.Object
org.openejb.client.EJBInvocationHandler
org.openejb.client.EJBObjectHandler
org.openejb.client.EntityEJBObjectHandler
- All Implemented Interfaces:
- java.io.Serializable, InvocationHandler, RequestMethods, ResponseCodes
public class EntityEJBObjectHandler
- extends EJBObjectHandler
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
Fields inherited from class org.openejb.client.EJBInvocationHandler |
client, ejb, EQUALS, HASHCODE, inProxyMap, isInvalidReference, liveHandleRegistry, primaryKey, request, server, TOSTRING |
Fields inherited from interface org.openejb.client.ResponseCodes |
AUTH_DENIED, AUTH_GRANTED, AUTH_REDIRECT, EJB_APP_EXCEPTION, EJB_ERROR, EJB_OK, EJB_OK_CREATE, EJB_OK_FOUND, EJB_OK_FOUND_COLLECTION, EJB_OK_FOUND_ENUMERATION, EJB_OK_NOT_FOUND, EJB_SYS_EXCEPTION, JNDI_CONTEXT, JNDI_EJBHOME, JNDI_ENUMERATION, JNDI_ERROR, JNDI_NAMING_EXCEPTION, JNDI_NOT_FOUND, JNDI_OK, JNDI_RUNTIME_EXCEPTION |
Fields inherited from interface org.openejb.client.RequestMethods |
AUTH_REQUEST, EJB_HOME_CREATE, EJB_HOME_FIND, EJB_HOME_GET_EJB_META_DATA, EJB_HOME_GET_HOME_HANDLE, EJB_HOME_REMOVE_BY_HANDLE, EJB_HOME_REMOVE_BY_PKEY, EJB_OBJECT_BUSINESS_METHOD, EJB_OBJECT_GET_EJB_HOME, EJB_OBJECT_GET_HANDLE, EJB_OBJECT_GET_PRIMARY_KEY, EJB_OBJECT_IS_IDENTICAL, EJB_OBJECT_REMOVE, EJB_REQUEST, JNDI_LIST, JNDI_LIST_BINDINGS, JNDI_LOOKUP, JNDI_REQUEST, STOP_REQUEST_quit, STOP_REQUEST_Quit, STOP_REQUEST_stop, STOP_REQUEST_Stop |
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. |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EntityEJBObjectHandler
public EntityEJBObjectHandler()
EntityEJBObjectHandler
public EntityEJBObjectHandler(EJBMetaDataImpl ejb,
ServerMetaData server,
ClientMetaData client)
EntityEJBObjectHandler
public EntityEJBObjectHandler(EJBMetaDataImpl ejb,
ServerMetaData server,
ClientMetaData client,
java.lang.Object primaryKey)
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 EJBInvocationHandler.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.
- Specified by:
getRegistryId
in class EJBObjectHandler
getPrimaryKey
protected java.lang.Object getPrimaryKey(java.lang.reflect.Method method,
java.lang.Object[] args,
java.lang.Object proxy)
throws java.lang.Throwable
- Specified by:
getPrimaryKey
in class EJBObjectHandler
- Throws:
java.lang.Throwable
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.
- Specified by:
isIdentical
in class EJBObjectHandler
- Parameters:
method
- args
- proxy
-
- Returns:
- Object
- 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
- Specified by:
remove
in class EJBObjectHandler
- Throws:
java.lang.Throwable
Copyright © 1999-2011 OpenEJB. All Rights Reserved.