Package org.apache.naming.factory
Class DataSourceLinkFactory
java.lang.Object
org.apache.naming.factory.ResourceLinkFactory
org.apache.naming.factory.DataSourceLinkFactory
- All Implemented Interfaces:
- ObjectFactory
Object factory for resource links for shared data sources.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classSimple wrapper class that will allow a user to configure a ResourceLink for a data source so that whenDataSource.getConnection()is called, it will invokeDataSource.getConnection(String, String)with the preconfigured username and password.
- 
Field SummaryFields inherited from class org.apache.naming.factory.ResourceLinkFactorysm
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) Create a new DataSource instance.static voidsetGlobalContext(Context newGlobalContext) protected ObjectwrapDataSource(Object datasource, String username, String password) Methods inherited from class org.apache.naming.factory.ResourceLinkFactoryderegisterGlobalResourceAccess, deregisterGlobalResourceAccess, registerGlobalResourceAccess
- 
Constructor Details- 
DataSourceLinkFactorypublic DataSourceLinkFactory()
 
- 
- 
Method Details- 
setGlobalContext
- 
getObjectInstancepublic Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) throws NamingExceptionCreate a new DataSource instance.- Specified by:
- getObjectInstancein interface- ObjectFactory
- Overrides:
- getObjectInstancein class- ResourceLinkFactory
- Parameters:
- obj- The reference object describing the DataSource
- Throws:
- NamingException
 
- 
wrapDataSourceprotected Object wrapDataSource(Object datasource, String username, String password) throws NamingException - Throws:
- NamingException
 
 
-