public class DataSourceLinkFactory extends ResourceLinkFactory
Object factory for resource links for shared data sources.
| Modifier and Type | Class and Description |
|---|---|
static class |
DataSourceLinkFactory.DataSourceHandler
Simple wrapper class that will allow a user to configure a ResourceLink for a data source
so that when
DataSource.getConnection() is called, it will invoke
DataSource.getConnection(String, String) with the preconfigured username and password. |
sm| Constructor and Description |
|---|
DataSourceLinkFactory() |
| Modifier and Type | Method and Description |
|---|---|
Object |
getObjectInstance(Object obj,
Name name,
Context nameCtx,
Hashtable<?,?> environment)
Create a new DataSource instance.
|
static void |
setGlobalContext(Context newGlobalContext) |
protected Object |
wrapDataSource(Object datasource,
String username,
String password) |
deregisterGlobalResourceAccess, deregisterGlobalResourceAccess, registerGlobalResourceAccesspublic static void setGlobalContext(Context newGlobalContext)
public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment) throws NamingException
getObjectInstance in interface ObjectFactorygetObjectInstance in class ResourceLinkFactoryobj - The reference object describing the DataSourceNamingExceptionprotected Object wrapDataSource(Object datasource, String username, String password) throws NamingException
NamingExceptionCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.