Class JndiBase

java.lang.Object
org.frankframework.jndi.JndiBase
All Implemented Interfaces:
HasApplicationContext, IConfigurable, IScopeProvider, NameAware
Direct Known Subclasses:
JMSFacade, LdapSender, TomcatJndiProxy

public class JndiBase extends Object implements IConfigurable, HasApplicationContext, NameAware
Provides all JNDI functions and is meant to act as a base class. TODO: Remove this base class!
Author:
Johan Verrips IOS
  • Field Details

    • log

      protected org.apache.logging.log4j.Logger log
  • Constructor Details

    • JndiBase

      public JndiBase()
  • Method Details

    • configure

      public void configure() throws ConfigurationException
      Description copied from interface: IConfigurable
      Configure this component.

      configure() is called once at startup of the framework in the configure method of the owner of this IConfigurable. Purpose of this method is to check whether the static configuration of the object is correct. As much as possible class-instantiating should take place in the configure(), to improve performance.

      In the case of a container, this will propagate the configure signal to all components that apply.

      Specified by:
      configure in interface IConfigurable
      Throws:
      ConfigurationException - in case it was not able to configure the component.
    • stop

      public void stop()
    • getJndiEnv

      public Properties getJndiEnv() throws NamingException
      Throws:
      NamingException
    • getContext

      public Context getContext() throws NamingException
      When InitialContextFactory and ProviderURL are set, these are used to get the Context. Otherwise, the InitialContext is retrieved without parameters.
      Notice: you can set the parameters on the commandline with
      java -Djava.naming.factory.initial=xxx -Djava.naming.provider.url=xxx
      Throws:
      NamingException
    • setAuthentication

      public void setAuthentication(String newAuthentication)
      maps to the field context.security_authentication
    • setCredentials

      public void setCredentials(String newCredentials)
      username to connect to context, maps to context.security_credentials
    • setInitialContextFactoryName

      public void setInitialContextFactoryName(String value)
      class to use as initial context factory
    • setProviderURL

      public void setProviderURL(String value)
      Sets the value of providerURL
    • setSecurityProtocol

      public void setSecurityProtocol(String securityProtocol)
      maps to the field context.security_protocol
    • setUrlPkgPrefixes

      public void setUrlPkgPrefixes(String newUrlPkgPrefixes)
      maps to the field context.url_pkg_prefixes
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setJmsRealm

      public void setJmsRealm(String jmsRealmName)
      loads JNDI (and other) properties from a JmsRealm
      See Also:
    • setPrincipal

      public void setPrincipal(String string)
      username to connect to context, maps to context.security_principal
    • setJndiAuthAlias

      public void setJndiAuthAlias(String string)
      authentication alias, may be used to override principal and credential-settings
    • setJndiContextPrefix

      public void setJndiContextPrefix(String string)
    • setJndiProperties

      public void setJndiProperties(String jndiProperties)
    • setName

      public void setName(String name)
      Name of the sender or the listener
      Specified by:
      setName in interface NameAware