public class JNDIConnectionManager
extends java.lang.Object
| Constructor and Description |
|---|
JNDIConnectionManager()
Create a new connection manager.
|
JNDIConnectionManager(ConnectionData connectionData) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkForFailBack()
Handles failback to the primary server.
|
protected static boolean |
checkIfExceptionIsFailable(javax.naming.NamingException exception)
This static method is used to determine if an exception of runtime type NamingException is eligable for a server
failover.
|
void |
dumpConfiguration()
dumps the current JNDI configuration.DEBUG mode has to be enabled.Value of
"java.naming.security.credentials" will be skipped
|
protected void |
dumpConfiguration(java.util.Hashtable<java.lang.String,java.lang.String> environment) |
protected void |
failCurrentServer(java.lang.Exception reasonForFailure)
Fails the current server.
|
javax.naming.ldap.LdapContext |
getDirContext(JNDIConnectionImpl conn,
java.lang.String connectDN,
char[] connectPassword)
Fetch a working DirContext connection from the pool.
|
java.lang.String |
getServerURL() |
boolean |
isCurrentServerAvailable()
Checks to see if the current server is actually functioning or not.
|
void |
setConnection(ConnectionData connectionData)
Sets the configuration used by the class.
|
public JNDIConnectionManager()
public JNDIConnectionManager(ConnectionData connectionData)
public void setConnection(ConnectionData connectionData)
connectionData - protected void failCurrentServer(java.lang.Exception reasonForFailure)
reasonForFailure - the original exception that prompted the failover cycle.public javax.naming.ldap.LdapContext getDirContext(JNDIConnectionImpl conn, java.lang.String connectDN, char[] connectPassword) throws LDAPUnavailableException, javax.naming.NamingException
connectDN - connectPassword - LDAPUnavailableExceptionjavax.naming.NamingExceptionpublic final void dumpConfiguration()
protected final void dumpConfiguration(java.util.Hashtable<java.lang.String,java.lang.String> environment)
public java.lang.String getServerURL()
public void checkForFailBack()
public boolean isCurrentServerAvailable()
protected static boolean checkIfExceptionIsFailable(javax.naming.NamingException exception)
exception - Copyright © 2018 SAP SE. All Rights Reserved.