Class PerUserPoolDataSourceFactory
- java.lang.Object
-
- org.apache.commons.dbcp.datasources.PerUserPoolDataSourceFactory
-
- All Implemented Interfaces:
javax.naming.spi.ObjectFactory
public class PerUserPoolDataSourceFactory extends java.lang.ObjectA JNDI ObjectFactory which createsSharedPoolDataSources- Version:
- $Revision: 479137 $ $Date: 2006-11-25 10:51:48 -0500 (Sat, 25 Nov 2006) $
-
-
Constructor Summary
Constructors Constructor Description PerUserPoolDataSourceFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidcloseAll()Close all pools associated with this class.protected static java.lang.Objectdeserialize(byte[] data)used to set some properties saved within a Referenceprotected InstanceKeyDataSourcegetNewInstance(javax.naming.Reference ref)Creates an instance of the subclass and sets any properties contained in the Reference.java.lang.ObjectgetObjectInstance(java.lang.Object refObj, javax.naming.Name name, javax.naming.Context context, java.util.Hashtable env)implements ObjectFactory to create an instance of SharedPoolDataSource or PerUserPoolDataSourceprotected booleanisCorrectClass(java.lang.String className)
-
-
-
Method Detail
-
isCorrectClass
protected boolean isCorrectClass(java.lang.String className)
- Returns:
- true if and only if className is the value returned from getClass().getName().toString()
-
getNewInstance
protected InstanceKeyDataSource getNewInstance(javax.naming.Reference ref) throws java.io.IOException, java.lang.ClassNotFoundException
Creates an instance of the subclass and sets any properties contained in the Reference.- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
closeAll
public static void closeAll() throws java.lang.ExceptionClose all pools associated with this class.- Throws:
java.lang.Exception
-
getObjectInstance
public java.lang.Object getObjectInstance(java.lang.Object refObj, javax.naming.Name name, javax.naming.Context context, java.util.Hashtable env) throws java.io.IOException, java.lang.ClassNotFoundExceptionimplements ObjectFactory to create an instance of SharedPoolDataSource or PerUserPoolDataSource- Specified by:
getObjectInstancein interfacejavax.naming.spi.ObjectFactory- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
deserialize
protected static final java.lang.Object deserialize(byte[] data) throws java.io.IOException, java.lang.ClassNotFoundExceptionused to set some properties saved within a Reference- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
-