org.objectweb.jonas_ejb.container
Class HomeFactory

java.lang.Object
  extended by org.objectweb.jonas_ejb.container.HomeFactory
All Implemented Interfaces:
javax.naming.spi.ObjectFactory

public class HomeFactory
extends java.lang.Object
implements javax.naming.spi.ObjectFactory

This Factory return Home or LocalHome objects to clients. No need to use it in case of RMI Remote Home because Remote References are registered directly in JNDI. This class should be used only for local Home or ServiceEndpointHome

Author:
Guillaume Riviere (Inria)

Constructor Summary
HomeFactory()
           
 
Method Summary
 java.lang.Object getObjectInstance(java.lang.Object refObj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable env)
          Used in case of local Home or ServiceEndpointHome
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HomeFactory

public HomeFactory()
Method Detail

getObjectInstance

public java.lang.Object getObjectInstance(java.lang.Object refObj,
                                          javax.naming.Name name,
                                          javax.naming.Context nameCtx,
                                          java.util.Hashtable env)
                                   throws java.lang.Exception
Used in case of local Home or ServiceEndpointHome

Specified by:
getObjectInstance in interface javax.naming.spi.ObjectFactory
Parameters:
refObj - - The possibly null object containing location or reference information that can be used in creating an object.
name - - The name of this object relative to nameCtx, or null if no name is specified.
nameCtx - - The context relative to which the name parameter is specified, or null if name is relative to the default initial context.
env - - The possibly null environment that is used in creating the object.
Returns:
ServiceEndpointHome or LocalHome object
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.