Package org.apache.naming.factory
Class DataSourceLinkFactory
- java.lang.Object
- 
- org.apache.naming.factory.ResourceLinkFactory
- 
- org.apache.naming.factory.DataSourceLinkFactory
 
 
- 
- All Implemented Interfaces:
- javax.naming.spi.ObjectFactory
 
 public class DataSourceLinkFactory extends ResourceLinkFactory Object factory for resource links for shared data sources. 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classDataSourceLinkFactory.DataSourceHandlerSimple 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 Summary- 
Fields inherited from class org.apache.naming.factory.ResourceLinkFactorysm
 
- 
 - 
Constructor SummaryConstructors Constructor Description DataSourceLinkFactory()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable<?,?> environment)Create a new DataSource instance.static voidsetGlobalContext(javax.naming.Context newGlobalContext)protected java.lang.ObjectwrapDataSource(java.lang.Object datasource, java.lang.String username, java.lang.String password)- 
Methods inherited from class org.apache.naming.factory.ResourceLinkFactoryderegisterGlobalResourceAccess, deregisterGlobalResourceAccess, registerGlobalResourceAccess
 
- 
 
- 
- 
- 
Method Detail- 
setGlobalContextpublic static void setGlobalContext(javax.naming.Context newGlobalContext) 
 - 
getObjectInstancepublic java.lang.Object getObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable<?,?> environment) throws javax.naming.NamingExceptionCreate a new DataSource instance.- Specified by:
- getObjectInstancein interface- javax.naming.spi.ObjectFactory
- Overrides:
- getObjectInstancein class- ResourceLinkFactory
- Parameters:
- obj- The reference object describing the DataSource
- Throws:
- javax.naming.NamingException
 
 - 
wrapDataSourceprotected java.lang.Object wrapDataSource(java.lang.Object datasource, java.lang.String username, java.lang.String password) throws javax.naming.NamingException- Throws:
- javax.naming.NamingException
 
 
- 
 
-