try {
DirContext ctx = new InitialDirContext( ctxParameters );
if ( ctx != null ) {
return ctx;
} else {
throw new ServiceConnectionFailedException(
this, "Invalid JNDI connection parameters." );
}
} catch ( NamingException e ) {
getLogger().log( name + ": Error Connecting to LDAP Server",
e,
LOG_CHANNEL,
Logger.CRITICAL );
throw new ServiceConnectionFailedException( this, e );
}
}