public class JndiManager extends AbstractManager
Context
.count, LOGGER
Modifier and Type | Method and Description |
---|---|
static Properties |
createProperties(String initialContextFactoryName,
String providerURL,
String urlPkgPrefixes,
String securityPrincipal,
String securityCredentials,
Properties additionalProperties)
Creates JNDI Properties with the provided configuration information.
|
static JndiManager |
getDefaultManager()
Gets the default JndiManager using the default
InitialContext . |
static JndiManager |
getDefaultManager(String name)
Gets a named JndiManager using the default
InitialContext . |
static JndiManager |
getJndiManager(Properties properties)
Gets a JndiManager with the provided configuration information.
|
static JndiManager |
getJndiManager(String initialContextFactoryName,
String providerURL,
String urlPkgPrefixes,
String securityPrincipal,
String securityCredentials,
Properties additionalProperties)
Gets a JndiManager with the provided configuration information.
|
<T> T |
lookup(String name)
Looks up a named object through this JNDI context.
|
protected boolean |
releaseSub(long timeout,
TimeUnit timeUnit)
May be overridden by managers to perform processing while the manager is being released and the
lock is held.
|
String |
toString() |
close, getContentFormat, getCount, getLoggerContext, getManager, getName, hasManager, log, logDebug, logError, logger, logWarn, narrow, release, stop, updateData
public static JndiManager getDefaultManager()
InitialContext
.public static JndiManager getDefaultManager(String name)
InitialContext
.name
- the name of the JndiManager instance to create or use if availablepublic static JndiManager getJndiManager(String initialContextFactoryName, String providerURL, String urlPkgPrefixes, String securityPrincipal, String securityCredentials, Properties additionalProperties)
initialContextFactoryName
- Fully qualified class name of an implementation of
InitialContextFactory
.providerURL
- The provider URL to use for the JNDI connection (specific to the above factory).urlPkgPrefixes
- A colon-separated list of package prefixes for the class name of the factory
class that will create a URL context factorysecurityPrincipal
- The name of the identity of the Principal.securityCredentials
- The security credentials of the Principal.additionalProperties
- Any additional JNDI environment properties to set or null
for none.public static JndiManager getJndiManager(Properties properties)
properties
- JNDI properties, usually created by calling createProperties(String, String, String, String, String, Properties)
.createProperties(String, String, String, String, String, Properties)
public static Properties createProperties(String initialContextFactoryName, String providerURL, String urlPkgPrefixes, String securityPrincipal, String securityCredentials, Properties additionalProperties)
initialContextFactoryName
- Fully qualified class name of an implementation of InitialContextFactory
.providerURL
- The provider URL to use for the JNDI connection (specific to the above factory).urlPkgPrefixes
- A colon-separated list of package prefixes for the class name of the factory class that will create a
URL context factorysecurityPrincipal
- The name of the identity of the Principal.securityCredentials
- The security credentials of the Principal.additionalProperties
- Any additional JNDI environment properties to set or null
for none.protected boolean releaseSub(long timeout, TimeUnit timeUnit)
AbstractManager
releaseSub
in class AbstractManager
timeout
- timeouttimeUnit
- timeout time unitpublic <T> T lookup(String name) throws NamingException
T
- the type of the object.name
- name of the object to look up.NamingException
- if a naming exception is encounteredCopyright © 1999-2019 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.