/** * Returns the LdapApiService instance used by this connection pool. * * @return The LdapApiService instance used by this connection pool. */ public LdapApiService getLdapApiService() { return ( ( AbstractPoolableLdapConnectionFactory ) factory ).getLdapApiService(); }
/** * {@inheritDoc} * * There is nothing to do to activate a connection. */ @Override public void activateObject( PooledObject<LdapConnection> pooledObject ) throws LdapException { LdapConnection connection = pooledObject.getObject(); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_04146_ACTIVATING, connection ) ); } super.activateObject( pooledObject ); // clear the monitors ( ( MonitoringLdapConnection ) connection ).resetMonitors(); }
private void disconnect(@Nullable LdapConnection connection) { try { if (connection != null) { if (adminPool == null) { adminConnectionFactory.destroyObject(connection); } else { adminPool.releaseConnection(connection); } } } catch (Exception e) { log.warn("Error while disconnecting from the ldap server.", e); } }
@NotNull private LdapConnection connect() throws ExternalIdentityException { try { if (adminPool == null) { return adminConnectionFactory.makeObject(); } else { return adminPool.getConnection(); } } catch (Exception e) { String msg = "Error while connecting to the ldap server."; log.error(msg, e); throw new ExternalIdentityException(msg, e); } }
adminConnectionFactory.setValidator(new LookupLdapConnectionValidator()); } else { adminConnectionFactory.setValidator(new DefaultLdapConnectionValidator());
/** * {@inheritDoc} * * There is nothing to do to activate a connection. */ @Override public void activateObject( PooledObject<LdapConnection> pooledObject ) throws LdapException { LdapConnection connection = pooledObject.getObject(); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_04146_ACTIVATING, connection ) ); } super.activateObject( pooledObject ); // clear the monitors ( ( MonitoringLdapConnection ) connection ).resetMonitors(); }
/** * Returns the LdapApiService instance used by this connection pool. * * @return The LdapApiService instance used by this connection pool. */ public LdapApiService getLdapApiService() { return ( ( AbstractPoolableLdapConnectionFactory ) factory ).getLdapApiService(); }
/** * {@inheritDoc} * * There is nothing to do to activate a connection. */ @Override public void activateObject( PooledObject<LdapConnection> pooledObject ) throws LdapException { LdapConnection connection = pooledObject.getObject(); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_04146_ACTIVATING, connection ) ); } super.activateObject( pooledObject ); // clear the monitors ( ( MonitoringLdapConnection ) connection ).resetMonitors(); }
/** * Returns the LdapApiService instance used by this connection pool. * * @return The LdapApiService instance used by this connection pool. */ public LdapApiService getLdapApiService() { return ( ( AbstractPoolableLdapConnectionFactory ) factory ).getLdapApiService(); }