org.openejb.client
Class EJBObjectHandler
java.lang.Object
org.openejb.client.EJBInvocationHandler
org.openejb.client.EJBObjectHandler
- All Implemented Interfaces:
- java.io.Serializable, InvocationHandler, RequestMethods, ResponseCodes
- Direct Known Subclasses:
- EntityEJBObjectHandler, StatefulEJBObjectHandler, StatelessEJBObjectHandler
public abstract class EJBObjectHandler
- extends EJBInvocationHandler
- Since:
- 11/25/2001
- Author:
- David Blevins
- See Also:
- Serialized Form
Field Summary |
protected static java.lang.reflect.Method |
GETEJBHOME
|
protected static java.lang.reflect.Method |
GETHANDLE
|
protected static java.lang.reflect.Method |
GETHANDLER
|
protected static java.lang.reflect.Method |
GETPRIMARYKEY
|
protected static java.lang.reflect.Method |
ISIDENTICAL
|
java.lang.Object |
registryId
|
protected static java.lang.reflect.Method |
REMOVE
|
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 |
java.lang.Object |
_invoke(java.lang.Object p,
java.lang.reflect.Method m,
java.lang.Object[] a)
Overridden by subclasses and called by EJBInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[]) . |
protected java.lang.Object |
businessMethod(java.lang.reflect.Method method,
java.lang.Object[] args,
java.lang.Object proxy)
|
static EJBObjectHandler |
createEJBObjectHandler(EJBMetaDataImpl ejb,
ServerMetaData server,
ClientMetaData client,
java.lang.Object primaryKey)
|
EJBObjectProxy |
createEJBObjectProxy()
|
protected java.lang.Object |
getEJBHome(java.lang.reflect.Method method,
java.lang.Object[] args,
java.lang.Object proxy)
|
protected java.lang.Object |
getHandle(java.lang.reflect.Method method,
java.lang.Object[] args,
java.lang.Object proxy)
|
protected abstract java.lang.Object |
getPrimaryKey(java.lang.reflect.Method method,
java.lang.Object[] args,
java.lang.Object proxy)
|
abstract 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 abstract java.lang.Object |
isIdentical(java.lang.reflect.Method method,
java.lang.Object[] args,
java.lang.Object proxy)
|
protected abstract java.lang.Object |
remove(java.lang.reflect.Method method,
java.lang.Object[] args,
java.lang.Object proxy)
|
protected void |
setEJBHomeProxy(EJBHomeProxy ejbHome)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GETEJBHOME
protected static final java.lang.reflect.Method GETEJBHOME
GETHANDLE
protected static final java.lang.reflect.Method GETHANDLE
GETPRIMARYKEY
protected static final java.lang.reflect.Method GETPRIMARYKEY
ISIDENTICAL
protected static final java.lang.reflect.Method ISIDENTICAL
REMOVE
protected static final java.lang.reflect.Method REMOVE
GETHANDLER
protected static final java.lang.reflect.Method GETHANDLER
registryId
public java.lang.Object registryId
EJBObjectHandler
public EJBObjectHandler()
EJBObjectHandler
public EJBObjectHandler(EJBMetaDataImpl ejb,
ServerMetaData server,
ClientMetaData client)
EJBObjectHandler
public EJBObjectHandler(EJBMetaDataImpl ejb,
ServerMetaData server,
ClientMetaData client,
java.lang.Object primaryKey)
setEJBHomeProxy
protected void setEJBHomeProxy(EJBHomeProxy ejbHome)
createEJBObjectHandler
public static EJBObjectHandler createEJBObjectHandler(EJBMetaDataImpl ejb,
ServerMetaData server,
ClientMetaData client,
java.lang.Object primaryKey)
getRegistryId
public abstract 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. For example, 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. Another example
is the StatefulEjbObjectHanlder which overrides this method to return the stateful bean's hidden primary key,
which is a java.rmi.dgc.VMID.
createEJBObjectProxy
public EJBObjectProxy createEJBObjectProxy()
_invoke
public java.lang.Object _invoke(java.lang.Object p,
java.lang.reflect.Method m,
java.lang.Object[] a)
throws java.lang.Throwable
- Description copied from class:
EJBInvocationHandler
- Overridden by subclasses and called by
EJBInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
.
Subclasses implement the main behavior of calling invoke on the
Container that the bean deployment lives in.
- Specified by:
_invoke
in class EJBInvocationHandler
- Parameters:
p
- The Proxy subclass that is the bean's EJBObject or EJBHome.m
- The bean method that the caller is attempting to invoke.a
- The arguments to the method being invoked.
- Returns:
- The result of invoking the appropriate method on the bean instance.
- Throws:
java.lang.Throwable
getEJBHome
protected java.lang.Object getEJBHome(java.lang.reflect.Method method,
java.lang.Object[] args,
java.lang.Object proxy)
throws java.lang.Throwable
- Throws:
java.lang.Throwable
getHandle
protected java.lang.Object getHandle(java.lang.reflect.Method method,
java.lang.Object[] args,
java.lang.Object proxy)
throws java.lang.Throwable
- Throws:
java.lang.Throwable
getPrimaryKey
protected abstract java.lang.Object getPrimaryKey(java.lang.reflect.Method method,
java.lang.Object[] args,
java.lang.Object proxy)
throws java.lang.Throwable
- Throws:
java.lang.Throwable
isIdentical
protected abstract java.lang.Object isIdentical(java.lang.reflect.Method method,
java.lang.Object[] args,
java.lang.Object proxy)
throws java.lang.Throwable
- Throws:
java.lang.Throwable
remove
protected abstract java.lang.Object remove(java.lang.reflect.Method method,
java.lang.Object[] args,
java.lang.Object proxy)
throws java.lang.Throwable
- Throws:
java.lang.Throwable
businessMethod
protected java.lang.Object businessMethod(java.lang.reflect.Method method,
java.lang.Object[] args,
java.lang.Object proxy)
throws java.lang.Throwable
- Throws:
java.lang.Throwable
Copyright © 1999-2011 OpenEJB. All Rights Reserved.