Package org.apache.catalina.users
Class MemoryUserDatabaseFactory
- java.lang.Object
-
- org.apache.catalina.users.MemoryUserDatabaseFactory
-
- All Implemented Interfaces:
javax.naming.spi.ObjectFactory
public class MemoryUserDatabaseFactory extends java.lang.Object implements javax.naming.spi.ObjectFactoryJNDI object creation factory for
MemoryUserDatabaseinstances. 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
MemoryUserDatabaseinstance is configured based on the following parameter values:- pathname - Absolute or relative (to the directory
path specified by the
catalina.basesystem property) pathname to the XML file from which our user information is loaded, and to which it is stored. [conf/tomcat-users.xml]
- Since:
- 4.1
- Author:
- Craig R. McClanahan
-
-
Constructor Summary
Constructors Constructor Description MemoryUserDatabaseFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable<?,?> environment)Create and return a newMemoryUserDatabaseinstance that has been configured according to the properties of the specifiedReference.
-
-
-
Method Detail
-
getObjectInstance
public java.lang.Object getObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable<?,?> environment) throws java.lang.ExceptionCreate and return a new
MemoryUserDatabaseinstance that has been configured according to the properties of the specifiedReference. If you instance can be created, returnnullinstead.- Specified by:
getObjectInstancein interfacejavax.naming.spi.ObjectFactory- 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 tonameCtxnameCtx- The context relative to which thenameparameter is specified, ornullifnameis relative to the default initial contextenvironment- The possibly null environment that is used in creating this object- Throws:
java.lang.Exception
-
-