org.objectweb.easybeans.rpc
Class LocalCallFactory
java.lang.Object
org.objectweb.easybeans.rpc.LocalCallFactory
- All Implemented Interfaces:
- javax.naming.spi.ObjectFactory
- Direct Known Subclasses:
- EJBLocalHomeCallFactory
public class LocalCallFactory
- extends java.lang.Object
- implements javax.naming.spi.ObjectFactory
Factory creating an EJB proxy for local calls.
- Author:
- Florent Benoit.
Method Summary |
protected LocalCallInvocationHandler |
buildLocalHandler(java.lang.Integer embeddedID,
java.lang.String containerId,
java.lang.String factoryName,
boolean useID)
Build a new Invocation 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 |
LocalCallFactory
public LocalCallFactory()
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
- 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.
buildLocalHandler
protected LocalCallInvocationHandler buildLocalHandler(java.lang.Integer embeddedID,
java.lang.String containerId,
java.lang.String factoryName,
boolean useID)
- Build a new Invocation handler.
- Parameters:
embeddedID
- the Embedded server ID.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 local handler