Class DataSourceUserDatabaseFactory
java.lang.Object
org.apache.catalina.users.DataSourceUserDatabaseFactory
- All Implemented Interfaces:
ObjectFactory
JNDI object creation factory for DataSourceUserDatabase
instances. This makes it convenient to configure
a user database in the global JNDI resources associated with this Catalina instance, and then link to that resource
for web applications that administer the contents of the user database.
The DataSourceUserDatabase
instance is configured based on the following parameter values:
- dataSourceName - JNDI name of the DataSource, which must be located in the same Context environment as the UserDatabase
- Author:
- Craig R. McClanahan
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
DataSourceUserDatabaseFactory
public DataSourceUserDatabaseFactory()
-
-
Method Details
-
getObjectInstance
public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) throws ExceptionCreate and return a new
DataSourceUserDatabase
instance that has been configured according to the properties of the specifiedReference
. If you instance can be created, returnnull
instead.- Specified by:
getObjectInstance
in interfaceObjectFactory
- Parameters:
obj
- The possibly null object containing location or reference information that can be used in creating an objectname
- The name of this object relative tonameCtx
nameCtx
- The context relative to which thename
parameter is specified, ornull
ifname
is relative to the default initial contextenvironment
- The possibly null environment that is used in creating this object- Throws:
Exception
-