public class JNDIReferenceFactory extends Object implements ObjectFactory
Constructor and Description |
---|
JNDIReferenceFactory() |
Modifier and Type | Method and Description |
---|---|
static Reference |
createReference(String instanceClassName,
JNDIStorable po)
Create a Reference instance from a JNDIStorable object
|
Object |
getObjectInstance(Object object,
Name name,
Context nameCtx,
Hashtable<?,?> environment)
This will be called by a JNDIprovider when a Reference is retrieved from
a JNDI store - and generates the original instance
|
static Properties |
getProperties(Reference reference) |
static Class<?> |
loadClass(Object thisObj,
String className)
Retrieve the class loader for a named class
|
public Object getObjectInstance(Object object, Name name, Context nameCtx, Hashtable<?,?> environment) throws Exception
getObjectInstance
in interface ObjectFactory
object
- the Reference objectname
- the JNDI namenameCtx
- the contextenvironment
- the environment settings used by JNDIException
- if building the instance from Reference fails (usually class not found)public static Properties getProperties(Reference reference)
public static Reference createReference(String instanceClassName, JNDIStorable po) throws NamingException
instanceClassName
- The name of the class that is being created.po
- The properties object to use when configuring the new instance.NamingException
- if an error occurs while creating the new instance.public static Class<?> loadClass(Object thisObj, String className) throws ClassNotFoundException
thisObj
- Local object to use when doing the lookup.className
- The name of the class being loaded.ClassNotFoundException
- if a matching class cannot be created.Copyright © 2020 The Apache Software Foundation. All rights reserved.