Class PerUserPoolDataSourceFactory
java.lang.Object
org.apache.commons.dbcp2.datasources.InstanceKeyDataSourceFactory
org.apache.commons.dbcp2.datasources.PerUserPoolDataSourceFactory
- All Implemented Interfaces:
ObjectFactory
A JNDI ObjectFactory which creates
SharedPoolDataSources- Since:
- 2.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected InstanceKeyDataSourcegetNewInstance(Reference ref) Creates an instance of the subclass and sets any properties contained in the Reference.protected booleanisCorrectClass(String className) Tests if className is the value returned from getClass().getName().toString().Methods inherited from class org.apache.commons.dbcp2.datasources.InstanceKeyDataSourceFactory
closeAll, deserialize, getObjectInstance, parseBoolean, parseInt, parseLong, registerNewInstance, removeInstance, toString
-
Field Details
-
PER_USER_POOL_CLASSNAME
-
-
Constructor Details
-
PerUserPoolDataSourceFactory
public PerUserPoolDataSourceFactory()
-
-
Method Details
-
getNewInstance
protected InstanceKeyDataSource getNewInstance(Reference ref) throws IOException, ClassNotFoundException Description copied from class:InstanceKeyDataSourceFactoryCreates an instance of the subclass and sets any properties contained in the Reference.- Specified by:
getNewInstancein classInstanceKeyDataSourceFactory- Parameters:
ref- The properties to be set on the created DataSource- Returns:
- A configured DataSource of the appropriate type.
- Throws:
IOException- If an I/O error occurs during the deserialization of a configuration parameter.ClassNotFoundException- If a class cannot be found during the deserialization of a configuration parameter.
-
isCorrectClass
Description copied from class:InstanceKeyDataSourceFactoryTests if className is the value returned from getClass().getName().toString().- Specified by:
isCorrectClassin classInstanceKeyDataSourceFactory- Parameters:
className- The class name to test.- Returns:
- true if and only if className is the value returned from getClass().getName().toString()
-