D - public abstract class CommonDataSourceObjectFactory<D> extends java.lang.Object implements javax.naming.spi.ObjectFactory, CommonDataSourceFactory<D>
| Modifier | Constructor and Description |
|---|---|
protected |
CommonDataSourceObjectFactory(java.lang.Class<D> targetClass) |
| Modifier and Type | Method and Description |
|---|---|
D |
createProxy(java.lang.String id,
java.lang.String config)
Creates a data source proxy to the specified cluster, using the configuration file at the specified location.
|
protected abstract DatabaseCluster<D> |
getDatabaseCluster(java.lang.String id,
java.lang.String config) |
protected abstract java.lang.reflect.InvocationHandler |
getInvocationHandler(DatabaseCluster<D> cluster) |
java.lang.Object |
getObjectInstance(java.lang.Object object,
javax.naming.Name name,
javax.naming.Context context,
java.util.Hashtable<?,?> environment) |
protected CommonDataSourceObjectFactory(java.lang.Class<D> targetClass)
targetClass - public java.lang.Object getObjectInstance(java.lang.Object object, javax.naming.Name name, javax.naming.Context context, java.util.Hashtable<?,?> environment) throws java.lang.Exception
getObjectInstance in interface javax.naming.spi.ObjectFactoryjava.lang.ExceptionObjectFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)public D createProxy(java.lang.String id, java.lang.String config) throws java.sql.SQLException
CommonDataSourceFactorycreateProxy in interface CommonDataSourceFactory<D>id - a database cluster identifierconfig - the location of the configuration file for this clusterjava.sql.SQLException - if the data source proxy could not be createdCommonDataSourceFactory.createProxy(java.lang.String, java.lang.String)protected abstract DatabaseCluster<D> getDatabaseCluster(java.lang.String id, java.lang.String config) throws java.sql.SQLException
id - config - java.sql.SQLExceptionprotected abstract java.lang.reflect.InvocationHandler getInvocationHandler(DatabaseCluster<D> cluster)
cluster -