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