public class SimpleJndiNameResolver extends Object
JndiNameResolver that maintains a Context instance opened all the time and always relies on
the context to do the look ups.| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
LOGGER |
| Constructor and Description |
|---|
SimpleJndiNameResolver() |
| Modifier and Type | Method and Description |
|---|---|
protected Context |
createInitialContext()
Creates a JNDI context using the current
contextFactory |
void |
dispose() |
InitialContextFactory |
getContextFactory() |
protected Hashtable |
getContextProperties() |
String |
getJndiInitialFactory() |
Map<String,Object> |
getJndiProviderProperties() |
String |
getJndiProviderUrl() |
void |
initialise() |
Object |
lookup(String name)
Looks up an object by name.
|
void |
setContextFactory(InitialContextFactory contextFactory) |
void |
setJndiInitialFactory(String jndiInitialFactory) |
void |
setJndiProviderProperties(Map<String,Object> jndiProviderProperties) |
void |
setJndiProviderUrl(String jndiProviderUrl) |
void |
start() |
void |
stop() |
public Object lookup(String name) throws NamingException
JndiNameResolvername - the name of the object to search forNamingException - is there is an error during the lookup.public void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionpublic void dispose()
dispose in interface org.mule.runtime.api.lifecycle.Disposableprotected Context createInitialContext() throws NamingException
contextFactoryContext instance. Callers must provide concurrent access control on the returned value.NamingException - if there is a problem during the context creation.protected Hashtable getContextProperties()
public String getJndiProviderUrl()
public void setJndiProviderUrl(String jndiProviderUrl)
public String getJndiInitialFactory()
public void setJndiInitialFactory(String jndiInitialFactory)
public void setJndiProviderProperties(Map<String,Object> jndiProviderProperties)
public InitialContextFactory getContextFactory()
public void setContextFactory(InitialContextFactory contextFactory)
public void start()
throws org.mule.runtime.api.exception.MuleException
start in interface org.mule.runtime.api.lifecycle.Startableorg.mule.runtime.api.exception.MuleExceptionpublic void stop()
throws org.mule.runtime.api.exception.MuleException
stop in interface org.mule.runtime.api.lifecycle.Stoppableorg.mule.runtime.api.exception.MuleExceptionCopyright © 2023. All rights reserved.