Package org.frankframework.jndi
Class JndiObjectLocator
java.lang.Object
org.frankframework.jndi.JndiObjectLocator
- All Implemented Interfaces:
IObjectLocator
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
public class JndiObjectLocator
extends Object
implements IObjectLocator, org.springframework.context.ApplicationContextAware
Baseclass for JDNI lookups.
Would be nice if we could have used JndiObjectFactoryBean but it has too much overhead
- Author:
- Niels Meijer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<O> O
lookup
(String jndiName, Properties jndiEnvironment, Class<O> lookupClass) Attempt to lookup the Object in the JNDI.void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) void
setJndiContextPrefix
(String jndiContextPrefix)
-
Constructor Details
-
JndiObjectLocator
public JndiObjectLocator()
-
-
Method Details
-
lookup
public <O> O lookup(String jndiName, Properties jndiEnvironment, Class<O> lookupClass) throws NamingException Attempt to lookup the Object in the JNDI. If it cannot find the object, attempt to try again (without a JNDI-prefix).- Specified by:
lookup
in interfaceIObjectLocator
- Type Parameters:
O
- Object class used by clients- Throws:
NamingException
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
setJndiContextPrefix
-