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. |
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) |
public static void setGlobalContext(Context newGlobalContext)
public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment) throws NamingException
getObjectInstance
in interface ObjectFactory
getObjectInstance
in class ResourceLinkFactory
obj
- The reference object describing the DataSourceNamingException
protected Object wrapDataSource(Object datasource, String username, String password) throws NamingException
NamingException
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.