org.openejb.client
Class EntityEJBHomeHandler

java.lang.Object
  extended by org.openejb.client.EJBInvocationHandler
      extended by org.openejb.client.EJBHomeHandler
          extended by org.openejb.client.EntityEJBHomeHandler
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, InvocationHandler, RequestMethods, ResponseCodes

public class EntityEJBHomeHandler
extends EJBHomeHandler

Since:
11/25/2001
Author:
David Blevins
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.openejb.client.EJBHomeHandler
GETEJBMETADATA, GETHANDLER, GETHOMEHANDLE, REMOVE_W_HAND, REMOVE_W_KEY
 
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
 
Constructor Summary
EntityEJBHomeHandler()
           
EntityEJBHomeHandler(EJBMetaDataImpl ejb, ServerMetaData server, ClientMetaData client)
           
 
Method Summary
protected  java.lang.Object findX(java.lang.reflect.Method method, java.lang.Object[] args, java.lang.Object proxy)
           EJB 1.1 -- 9.1.8 Finder method return type 9.1.8.1 Single-object finder Some finder methods (such as ejbFindByPrimaryKey) are designed to return at most one entity object.
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.
protected  java.lang.Object removeWithHandle(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.client.EJBHomeHandler
_invoke, create, createEJBHomeHandler, createEJBHomeProxy, getEJBMetaData, getHomeHandle, readExternal, writeExternal
 
Methods inherited from class org.openejb.client.EJBInvocationHandler
getMethod, invalidateAllHandlers, invalidateReference, invoke, print, println, registerHandler, request
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityEJBHomeHandler

public EntityEJBHomeHandler()

EntityEJBHomeHandler

public EntityEJBHomeHandler(EJBMetaDataImpl ejb,
                            ServerMetaData server,
                            ClientMetaData client)
Method Detail

findX

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

EJB 1.1 -- 9.1.8 Finder method return type 9.1.8.1 Single-object finder Some finder methods (such as ejbFindByPrimaryKey) are designed to return at most one entity object. For these single-object finders, the result type of the find(...)method defined in the entity bean?s home interface is the entity bean?s remote interface. The result type of the corresponding ejbFind(...) method defined in the entity?s implementation class is the entity bean?s primary key type. 9.1.8.2 Multi-object finders Some finder methods are designed to return multiple entity objects. For these multi-object finders, the result type of the find(...)method defined in the entity bean?s home interface is a col-lection of objects implementing the entity bean?s remote interface. The result type of the corresponding ejbFind(...) implementation method defined in the entity bean?s implementation class is a collection of objects of the entity bean?s primary key type. The Bean Provider can choose two types to define a collection type for a finder: ? the JDK? 1.1 java.util.Enumeration interface ? the Java? 2 java.util.Collection interface A Bean Provider that wants to ensure that the entity bean is compatible with containers and clients based on JDK TM 1.1 software must use the java.util.Enumeration interface for the finder?s result type.

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 EJBHomeHandler
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 EJBHomeHandler
Parameters:
method -
args -
Returns:
Returns null
Throws:
java.lang.Throwable
See Also:
EJBHome, EJBHome.remove(javax.ejb.Handle)

removeWithHandle

protected java.lang.Object removeWithHandle(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 javax.ejb.Handle object passed into the remove method in the EJBHome.

This method propogates to the container system.

remove(Handle handle) 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:
removeWithHandle in class EJBHomeHandler
Parameters:
method -
args -
Returns:
Returns null
Throws:
java.lang.Throwable
See Also:
EJBHome, EJBHome.remove(javax.ejb.Handle)


Copyright © 1999-2011 OpenEJB. All Rights Reserved.