Package org.frankframework.jndi
Class JndiBase
java.lang.Object
org.frankframework.jndi.JndiBase
- All Implemented Interfaces:
HasApplicationContext
,IConfigurable
,IScopeProvider
,NameAware
- Direct Known Subclasses:
JMSFacade
,LdapSender
,TomcatJndiProxy
Provides all JNDI functions and is meant to act as a base class.
TODO: Remove this base class!
- Author:
- Johan Verrips IOS
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Configure this component.When InitialContextFactory and ProviderURL are set, these are used to get theContext
.void
setAuthentication
(String newAuthentication) maps to the field context.security_authenticationvoid
setCredentials
(String newCredentials) username to connect to context, maps to context.security_credentialsvoid
class to use as initial context factoryvoid
setJmsRealm
(String jmsRealmName) loads JNDI (and other) properties from a JmsRealmvoid
setJndiAuthAlias
(String string) authentication alias, may be used to override principal and credential-settingsvoid
setJndiContextPrefix
(String string) void
setJndiProperties
(String jndiProperties) void
Name of the sender or the listenervoid
setPrincipal
(String string) username to connect to context, maps to context.security_principalvoid
setProviderURL
(String value) Sets the value of providerURLvoid
setSecurityProtocol
(String securityProtocol) maps to the field context.security_protocolvoid
setUrlPkgPrefixes
(String newUrlPkgPrefixes) maps to the field context.url_pkg_prefixesvoid
stop()
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoader
-
Field Details
-
log
protected org.apache.logging.log4j.Logger log
-
-
Constructor Details
-
JndiBase
public JndiBase()
-
-
Method Details
-
configure
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 thisIConfigurable
. 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 theconfigure()
, to improve performance.In the case of a container, this will propagate the configure signal to all components that apply.
- Specified by:
configure
in interfaceIConfigurable
- Throws:
ConfigurationException
- in case it was not able to configure the component.
-
stop
public void stop() -
getJndiEnv
- Throws:
NamingException
-
getContext
When InitialContextFactory and ProviderURL are set, these are used to get theContext
. 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
maps to the field context.security_authentication -
setCredentials
username to connect to context, maps to context.security_credentials -
setInitialContextFactoryName
class to use as initial context factory -
setProviderURL
Sets the value of providerURL -
setSecurityProtocol
maps to the field context.security_protocol -
setUrlPkgPrefixes
maps to the field context.url_pkg_prefixes -
toString
-
setJmsRealm
loads JNDI (and other) properties from a JmsRealm- See Also:
-
setPrincipal
username to connect to context, maps to context.security_principal -
setJndiAuthAlias
authentication alias, may be used to override principal and credential-settings -
setJndiContextPrefix
-
setJndiProperties
-
setName
Name of the sender or the listener
-