public class JndiManager extends AbstractManager
Context
manager.Modifier and Type | Class and Description |
---|---|
private static class |
JndiManager.JndiManagerFactory |
Modifier and Type | Field and Description |
---|---|
private javax.naming.Context |
context |
private static JndiManager.JndiManagerFactory |
FACTORY |
count, LOGGER
Modifier | Constructor and Description |
---|---|
private |
JndiManager(java.lang.String name,
javax.naming.Context context) |
Modifier and Type | Method and Description |
---|---|
static JndiManager |
getDefaultManager()
Gets the default JndiManager using the default
InitialContext . |
static JndiManager |
getDefaultManager(java.lang.String name)
Gets a named JndiManager using the default
InitialContext . |
static JndiManager |
getJndiManager(java.lang.String initialContextFactoryName,
java.lang.String providerURL,
java.lang.String urlPkgPrefixes,
java.lang.String securityPrincipal,
java.lang.String securityCredentials,
java.util.Properties additionalProperties)
Gets a JndiManager with the provided configuration information.
|
<T> T |
lookup(java.lang.String name)
Looks up a named object through this JNDI context.
|
protected boolean |
releaseSub(long timeout,
java.util.concurrent.TimeUnit timeUnit)
May be overridden by managers to perform processing while the manager is being released and the
lock is held.
|
close, getContentFormat, getCount, getLoggerContext, getManager, getName, hasManager, log, logDebug, logError, logWarn, release, stop, updateData
private static final JndiManager.JndiManagerFactory FACTORY
private final javax.naming.Context context
private JndiManager(java.lang.String name, javax.naming.Context context)
public static JndiManager getDefaultManager()
InitialContext
.public static JndiManager getDefaultManager(java.lang.String name)
InitialContext
.name
- the name of the JndiManager instance to create or use if availablepublic static JndiManager getJndiManager(java.lang.String initialContextFactoryName, java.lang.String providerURL, java.lang.String urlPkgPrefixes, java.lang.String securityPrincipal, java.lang.String securityCredentials, java.util.Properties additionalProperties)
initialContextFactoryName
- Fully qualified class name of an implementation of
javax.naming.spi.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, java.util.concurrent.TimeUnit timeUnit)
AbstractManager
releaseSub
in class AbstractManager
timeout
- timeouttimeUnit
- timeout time unitpublic <T> T lookup(java.lang.String name) throws javax.naming.NamingException
T
- the type of the object.name
- name of the object to look up.javax.naming.NamingException