Package com.sun.enterprise.naming.util
Class JndiInitializationNamingObjectFactory
- java.lang.Object
-
- com.sun.enterprise.naming.util.JndiInitializationNamingObjectFactory
-
- All Implemented Interfaces:
NamingObjectFactory,Serializable,org.glassfish.api.naming.NamingObjectProxy,org.glassfish.api.naming.NamingObjectProxy.InitializationNamingObjectProxy
@Service public class JndiInitializationNamingObjectFactory extends Object implements NamingObjectFactory, org.glassfish.api.naming.NamingObjectProxy.InitializationNamingObjectProxy, Serializable
A naming object factory that is used by resource-references of type JDBC/JMS/Connector/Mail so that Application Client Container based lookup of these references will result in the server returning the "Reference" instead of the actual object since the actual object will not work in the application client container.
By virtue of implementing NamingObjectProxy.InitializationNamingObjectProxy, above requirement of returning "Reference" is achieved. Refer other implementations like org.glassfish.resourcebase.resources.api.ResourceProxy and org.glassfish.javaee.services.CommonResourceProxy
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JndiInitializationNamingObjectFactory()JndiInitializationNamingObjectFactory(String name, String jndiName, boolean cacheResult)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectcreate(Context ic)booleanisCreateResultCacheable()Tells if the result of create() is cacheable.
-
-
-
Method Detail
-
isCreateResultCacheable
public boolean isCreateResultCacheable()
Description copied from interface:NamingObjectFactoryTells if the result of create() is cacheable. If so the naming manager will replace this object factory with the object itself.- Specified by:
isCreateResultCacheablein interfaceNamingObjectFactory- Returns:
- true if the result of create() can be cached
-
create
public Object create(Context ic) throws NamingException
- Specified by:
createin interfaceorg.glassfish.api.naming.NamingObjectProxy- Throws:
NamingException
-
-