@Override public void close() throws KettleException { if ( startTlsResponse != null ) { try { startTlsResponse.close(); } catch ( IOException e ) { throw new KettleException( e ); } finally { startTlsResponse = null; } } super.close(); } }
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (method.getName().equals(CLOSE_METHOD_NAME)) { tlsResponse.close(); return method.invoke(target, args); } else if (method.getName().equals(GET_TARGET_CONTEXT_METHOD_NAME)) { return target; } else { return method.invoke(target, args); } } }
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (method.getName().equals(CLOSE_METHOD_NAME)) { tlsResponse.close(); return method.invoke(target, args); } else if (method.getName().equals(GET_TARGET_CONTEXT_METHOD_NAME)) { return target; } else { return method.invoke(target, args); } } }
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (method.getName().equals(CLOSE_METHOD_NAME)) { tlsResponse.close(); return method.invoke(target, args); } else if (method.getName().equals(GET_TARGET_CONTEXT_METHOD_NAME)) { return target; } else { return method.invoke(target, args); } } }
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (method.getName().equals(CLOSE_METHOD_NAME)) { tlsResponse.close(); return method.invoke(target, args); } else if (method.getName().equals(GET_TARGET_CONTEXT_METHOD_NAME)) { return target; } else { return method.invoke(target, args); } } }
@Override public void close() throws NamingException { if (tls != null) { try { tls.close(); } catch (Exception err) { LOGGER.error("Could not close TLS", err); } } super.close(); } }
/** * Close connection before this object is deleted by the garbage collector. * @see java.lang.Object#finalize() */ @Override protected void finalize() throws Throwable { // Close the TLS connection (revert back to the underlying LDAP association) if (tlsResponse != null) { tlsResponse.close(); } // Close the connection to the LDAP server if (ctx != null) { ctx.close(); ctx = null; } super.finalize(); }
@Override public void close(final RequestControl[] controls) throws LdapException { try { if (stopTLSOnClose) { if (startTlsResponse != null) { startTlsResponse.close(); } } } catch (IOException e) { logger.error("Error stopping TLS", e); } finally { startTlsResponse = null; super.close(controls); } } }
@Override public void close(final RequestControl[] controls) throws LdapException { try { if (stopTLSOnClose) { if (startTlsResponse != null) { startTlsResponse.close(); } } } catch (IOException e) { logger.error("Error stopping TLS", e); } finally { startTlsResponse = null; super.close(controls); } } }
@Override public void close(final RequestControl[] controls) throws LdapException { try { if (stopTLSOnClose) { if (startTlsResponse != null) { startTlsResponse.close(); } } } catch (IOException e) { logger.error("Error stopping TLS", e); } finally { startTlsResponse = null; super.close(controls); } } }
private Object doClose(LdapContext delegate) throws IOException, IllegalAccessException, InvocationTargetException { try { if (tls != null) { try { tls.close(); } catch (final IOException e) { throw new InvocationTargetException(e); } } } finally { try { if (delegate != null) { delegate.close(); } } catch (final NamingException e) { throw new InvocationTargetException(e); } } return null; } }
startTLSResponse.close();
startTLSResponse.close();
/** * Close any open connection to the directory server for this Realm. * * @param context The directory context to be closed */ protected void close(DirContext context) { // Do nothing if there is no opened connection if (context == null) return; // Close tls startResponse if used if (tls != null) { try { tls.close(); } catch (IOException e) { containerLog.error(sm.getString("jndiRealm.tlsClose"), e); } } // Close our opened connection try { if (containerLog.isDebugEnabled()) containerLog.debug("Closing directory context"); context.close(); } catch (NamingException e) { containerLog.error(sm.getString("jndiRealm.close"), e); } this.context = null; }
/** * Close any open connection to the directory server for this Realm. * * @param context The directory context to be closed */ protected void close(DirContext context) { // Do nothing if there is no opened connection if (context == null) return; // Close tls startResponse if used if (tls != null) { try { tls.close(); } catch (IOException e) { containerLog.error(sm.getString("jndiRealm.tlsClose"), e); } } // Close our opened connection try { if (containerLog.isDebugEnabled()) containerLog.debug("Closing directory context"); context.close(); } catch (NamingException e) { containerLog.error(sm.getString("jndiRealm.close"), e); } this.context = null; }