public class JNDIConnectionManager extends 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(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(Hashtable<String,String> environment) |
protected void |
failCurrentServer(Exception reasonForFailure)
Fails the current server.
|
LdapContext |
getDirContext(JNDIConnectionImpl conn,
String connectDN,
char[] connectPassword)
Fetch a working DirContext connection from the pool.
|
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(Exception reasonForFailure)
reasonForFailure - the original exception that prompted the failover cycle.public LdapContext getDirContext(JNDIConnectionImpl conn, String connectDN, char[] connectPassword) throws LDAPUnavailableException, NamingException
connectDN - connectPassword - LDAPUnavailableExceptionNamingExceptionpublic final void dumpConfiguration()
public String getServerURL()
public void checkForFailBack()
public boolean isCurrentServerAvailable()
protected static boolean checkIfExceptionIsFailable(NamingException exception)
exception - Copyright © 2017 SAP SE. All Rights Reserved.