Class ResourceLinkFactory
java.lang.Object
org.apache.naming.factory.ResourceLinkFactory
- All Implemented Interfaces:
ObjectFactory
- Direct Known Subclasses:
DataSourceLinkFactory
Object factory for resource links.
- Author:
- Remy Maucherat
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
deregisterGlobalResourceAccess
(Context globalContext) static void
deregisterGlobalResourceAccess
(Context globalContext, String localName) getObjectInstance
(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) Create a new resource instance.static void
registerGlobalResourceAccess
(Context globalContext, String localName, String globalName) static void
setGlobalContext
(Context newGlobalContext) Set the global context (note: can only be used once).
-
Field Details
-
sm
-
-
Constructor Details
-
ResourceLinkFactory
public ResourceLinkFactory()
-
-
Method Details
-
setGlobalContext
Set the global context (note: can only be used once).- Parameters:
newGlobalContext
- new global context value
-
registerGlobalResourceAccess
-
deregisterGlobalResourceAccess
-
deregisterGlobalResourceAccess
-
getObjectInstance
public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) throws NamingExceptionCreate a new resource instance.- Specified by:
getObjectInstance
in interfaceObjectFactory
- Parameters:
name
- the bound namenameCtx
- unusedenvironment
- unused- Returns:
- the object instance
- Throws:
NamingException
- if an error occur creating the instance
-