Class PerUserPoolDataSourceFactory
java.lang.Object
org.datanucleus.store.rdbms.datasource.dbcp2.datasources.InstanceKeyDataSourceFactory
org.datanucleus.store.rdbms.datasource.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) Methods inherited from class org.datanucleus.store.rdbms.datasource.dbcp2.datasources.InstanceKeyDataSourceFactory
closeAll, deserialize, getObjectInstance, registerNewInstance, removeInstance
-
Field Details
-
PER_USER_POOL_CLASSNAME
-
-
Constructor Details
-
PerUserPoolDataSourceFactory
public PerUserPoolDataSourceFactory()
-
-
Method Details
-
isCorrectClass
- 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()
-
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.
-