Class JndiObjectLocator

java.lang.Object
org.frankframework.jndi.JndiObjectLocator
Type Parameters:
O - Object class used by clients
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 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 interface IObjectLocator
      Throws:
      NamingException
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • setJndiContextPrefix

      public void setJndiContextPrefix(String jndiContextPrefix)