Top Description Constructors Methods
org.apache.catalina.users

public Class MemoryUserDatabaseFactory

extends Object
implements ObjectFactory
Class Inheritance
All Implemented Interfaces
javax.naming.spi.ObjectFactory
Imports
java.util.Hashtable, javax.naming.Context, .Name, .RefAddr, .Reference, javax.naming.spi.ObjectFactory

JNDI object creation factory for MemoryUserDatabase 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 MemoryUserDatabase instance is configured based on the following parameter values:

Author
Craig R. McClanahan
Since
4.1

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
getObjectInstance(Object
The possibly null object containing location or reference information that can be used in creating an object
obj
,
Name
The name of this object relative to nameCtx
name
,
Context
The context relative to which the name parameter is specified, or null if name is relative to the default initial context
nameCtx
,
Hashtable<?, ?>
The possibly null environment that is used in creating this object
environment
)

Implements javax.naming.spi.ObjectFactory.getObjectInstance.

Create and return a new MemoryUserDatabase instance that has been configured according to the properties of the specified Reference.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

MemoryUserDatabaseFactoryback to summary
public MemoryUserDatabaseFactory()

Method Detail

getObjectInstanceback to summary
public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) throws Exception

Implements javax.naming.spi.ObjectFactory.getObjectInstance.

Create and return a new MemoryUserDatabase instance that has been configured according to the properties of the specified Reference. If you instance can be created, return null instead.

Parameters
obj:Object

The possibly null object containing location or reference information that can be used in creating an object

name:Name

The name of this object relative to nameCtx

nameCtx:Context

The context relative to which the name parameter is specified, or null if name is relative to the default initial context

environment:Hashtable<?, ?>

The possibly null environment that is used in creating this object

Returns:Object

Doc from javax.naming.spi.ObjectFactory.getObjectInstance.

The object created; null if an object cannot be created.

Annotations
@Override
Exceptions
Exception:

Doc from javax.naming.spi.ObjectFactory.getObjectInstance.

if this object factory encountered an exception while attempting to create an object, and no other object factories are to be tried.