Top Description Fields Constructors Methods
org.apache.naming.factory

public Class LookupFactory

extends Object
implements ObjectFactory
Class Inheritance
All Implemented Interfaces
javax.naming.spi.ObjectFactory
Imports
java.util.HashSet, .Hashtable, .Set, javax.naming.Context, .InitialContext, .Name, .NamingException, .RefAddr, .Reference, javax.naming.spi.ObjectFactory, org.apache.juli.logging.Log, .LogFactory, org.apache.naming.LookupRef, .StringManager

Object factory for lookups.

Field Summary

Modifier and TypeField and Description
private static final Log
private static final ThreadLocal<Set<String>>
private static final StringManager

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
getObjectInstance(Object
The reference object describing the DataSource
obj
,
Name
The name of this object relative to nameCtx, or null if no name is specified.
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 the object.
environment
)

Implements javax.naming.spi.ObjectFactory.getObjectInstance.

Create a new Resource env instance.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

logback to summary
private static final Log log
namesback to summary
private static final ThreadLocal<Set<String>> names
smback to summary
private static final StringManager sm

Constructor Detail

LookupFactoryback to summary
public LookupFactory()

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 a new Resource env instance.

Parameters
obj:Object

The reference object describing the DataSource

name:Name

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

The name of this object relative to nameCtx, or null if no name is specified.

nameCtx:Context

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

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

environment:Hashtable<?, ?>

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

The possibly null environment that is used in creating the 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.