Package com.sun.enterprise.naming.util
Class JndiNamingObjectFactory
- java.lang.Object
-
- com.sun.enterprise.naming.util.JndiNamingObjectFactory
-
- All Implemented Interfaces:
NamingObjectFactory
,NamingObjectProxy
@Service public class JndiNamingObjectFactory extends Object implements NamingObjectFactory
Factory for creating Objects with a given jndi nameThis factory creates objects by looking them up in the given
Context
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.glassfish.api.naming.NamingObjectProxy
NamingObjectProxy.InitializationNamingObjectProxy
-
-
Constructor Summary
Constructors Constructor Description JndiNamingObjectFactory(String name, String jndiName, boolean cacheResult)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
create(Context ic)
Create and return an object.boolean
isCreateResultCacheable()
Tells if the result of create() is cacheable.
-
-
-
Constructor Detail
-
JndiNamingObjectFactory
public JndiNamingObjectFactory(String name, String jndiName, boolean cacheResult)
- Parameters:
name
- the name of the object; equivalent to the name value of aResource
annotationjndiName
- the jndi name to lookup to get the object; equivalent to the lookup value of aResource
annotationcacheResult
- whether the result may have been cached
-
-
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 interfaceNamingObjectFactory
- Returns:
- true if the result of create() can be cached
-
create
public Object create(Context ic) throws NamingException
Description copied from interface:NamingObjectProxy
Create and return an object.- Specified by:
create
in interfaceNamingObjectProxy
- Returns:
- an object
- Throws:
NamingException
-
-