public void setDirectoryUser ( String userName , String password ) { this . authData = generateDirectoryAuthData ( userName , password ) ; if ( getStatus ( ) . isConnected ( ) ) { ErrorCode ec = sendConnectProtocol ( this . getConnectTimeOut ( ) ) ; if ( ErrorCode . SESSION_EXPIRED . equals ( ec ) ) { LOGGER . info ( "Session Expired, cleanup the client session." ) ; closeSession ( ) ; } else if ( ! ErrorCode . OK . equals ( ec ) ) { reopenSession ( ) ; } } }
Change the Directory Authentication .