Class 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 Detail

      • JndiInitializationNamingObjectFactory

        public JndiInitializationNamingObjectFactory()
      • JndiInitializationNamingObjectFactory

        public JndiInitializationNamingObjectFactory​(String name,
                                                     String jndiName,
                                                     boolean cacheResult)
    • Method Detail

      • isCreateResultCacheable

        public boolean isCreateResultCacheable()
        Description copied from interface: NamingObjectFactory
        Tells if the result of create() is cacheable. If so the naming manager will replace this object factory with the object itself.
        Specified by:
        isCreateResultCacheable in interface NamingObjectFactory
        Returns:
        true if the result of create() can be cached