/** * Method finito. * * @throws Exception */ public void finito() throws Exception { try { if (ctx != null) ctx.close(); } catch (NamingException e) { throw e; } }
/** Clean out state because of a failed authentication attempt */ private void cleanState() { username = null; if (password != null) { Arrays.fill(password, ' '); password = null; } try { if (ctx != null) { ctx.close(); } } catch (NamingException e) { // ignore } ctx = null; if (clearPass) { sharedState.remove(USERNAME_KEY); sharedState.remove(PASSWORD_KEY); } }