Class PerUserPoolDataSourceFactory
- java.lang.Object
-
- org.datanucleus.store.rdbms.datasource.dbcp2.datasources.InstanceKeyDataSourceFactory
-
- org.datanucleus.store.rdbms.datasource.dbcp2.datasources.PerUserPoolDataSourceFactory
-
- All Implemented Interfaces:
javax.naming.spi.ObjectFactory
public class PerUserPoolDataSourceFactory extends InstanceKeyDataSourceFactory
A JNDI ObjectFactory which createsSharedPoolDataSource
s- Since:
- 2.0
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
PER_USER_POOL_CLASSNAME
-
Constructor Summary
Constructors Constructor Description PerUserPoolDataSourceFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InstanceKeyDataSource
getNewInstance(javax.naming.Reference ref)
Creates an instance of the subclass and sets any properties contained in the Reference.protected boolean
isCorrectClass(java.lang.String className)
-
Methods inherited from class org.datanucleus.store.rdbms.datasource.dbcp2.datasources.InstanceKeyDataSourceFactory
closeAll, deserialize, getObjectInstance, registerNewInstance, removeInstance
-
-
-
-
Method Detail
-
isCorrectClass
protected boolean isCorrectClass(java.lang.String className)
- Specified by:
isCorrectClass
in 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(javax.naming.Reference ref) throws java.io.IOException, java.lang.ClassNotFoundException
Description copied from class:InstanceKeyDataSourceFactory
Creates an instance of the subclass and sets any properties contained in the Reference.- Specified by:
getNewInstance
in classInstanceKeyDataSourceFactory
- Parameters:
ref
- The properties to be set on the created DataSource- Returns:
- A configured DataSource of the appropriate type.
- Throws:
java.io.IOException
- If an I/O error occurs during the deserialization of a configuration parameter.java.lang.ClassNotFoundException
- If a class cannot be found during the deserialization of a configuration parameter.
-
-