org.objectweb.easybeans.rpc
Class EJBHomeCallFactory
java.lang.Object
org.objectweb.easybeans.rpc.RemoteCallFactory
org.objectweb.easybeans.rpc.EJBHomeCallFactory
- All Implemented Interfaces:
- javax.naming.spi.ObjectFactory
public class EJBHomeCallFactory
- extends RemoteCallFactory
Factory creating an EJB Remote Home proxy for remote calls.
- Author:
- Florent Benoit.
Field Summary |
private java.lang.String |
remoteInterface
Name of the remote interface. |
Method Summary |
protected ClientRPCInvocationHandler |
buildRemoteHandler(java.lang.String containerID,
java.lang.String factoryName,
boolean useID)
Build an instance of a remote RPC handler. |
java.lang.Object |
getObjectInstance(java.lang.Object obj,
javax.naming.Name name,
javax.naming.Context nameCtx,
java.util.Hashtable<?,?> environment)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
remoteInterface
private java.lang.String remoteInterface
- Name of the remote interface.
EJBHomeCallFactory
public EJBHomeCallFactory()
getObjectInstance
public java.lang.Object getObjectInstance(java.lang.Object obj,
javax.naming.Name name,
javax.naming.Context nameCtx,
java.util.Hashtable<?,?> environment)
throws java.lang.Exception
- Specified by:
getObjectInstance
in interface javax.naming.spi.ObjectFactory
- Overrides:
getObjectInstance
in class RemoteCallFactory
- Parameters:
obj
- the reference containing data to build instancename
- Name of context, relative to ctx, or null.nameCtx
- Context relative to which 'name' is named.environment
- Environment to use when creating the context *
- Returns:
- an instance of a proxy (an EJB) that handle local calls.
- Throws:
java.lang.Exception
- if this object factory encountered an exception while
attempting to create an object, and no other object factories are
to be tried.
buildRemoteHandler
protected ClientRPCInvocationHandler buildRemoteHandler(java.lang.String containerID,
java.lang.String factoryName,
boolean useID)
- Build an instance of a remote RPC handler. Can be used by subclasses to change the object.
- Overrides:
buildRemoteHandler
in class RemoteCallFactory
- Parameters:
containerID
- the id of the container that will be called on the
remote side.factoryName
- the name of the remote factory.useID
- true if all instance build with this ref are unique
(stateful), false if it references the same object (stateless)
- Returns:
- an instance of a remote handler.