Commit b8bffe8c authored by Brian Major's avatar Brian Major
Browse files

ac2 - fixed logging messages

parent c2d12dcd
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -70,7 +70,6 @@
package ca.nrc.cadc.ac.server.ldap;

import org.apache.log4j.Logger;
import org.seleniumhq.jetty7.util.log.Log;

import ca.nrc.cadc.ac.server.ldap.LdapConfig.LdapPool;
import ca.nrc.cadc.ac.server.ldap.LdapConfig.PoolPolicy;
@@ -98,7 +97,7 @@ public class LdapConnectionPool

    private static final int POOL_CHECK_INTERVAL_MILLESCONDS = 10000; // 10 seconds

    Profiler profiler = new Profiler(LdapPersistence.class);
    Profiler profiler = new Profiler(LdapConnectionPool.class);

    protected LdapConfig currentConfig;
    private LDAPReadWriteConnectionPool pool;
@@ -119,7 +118,7 @@ public class LdapConnectionPool
        {
            poolCheck();
            LDAPConnection conn = pool.getReadConnection();
            profiler.checkpoint("get read write connection");
            profiler.checkpoint("get read only connection");
            return conn;
        }
    }
+7 −2
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ class LdapConnections
{
    private final static Logger log = Logger.getLogger(LdapConnections.class);

    Profiler profiler = new Profiler(LdapPersistence.class);
    Profiler profiler = new Profiler(LdapConnections.class);

    private LdapPersistence persistence;

@@ -132,6 +132,8 @@ class LdapConnections
            log.debug("Obtaining manual config read only connection.");
            if (manualConfigPool == null)
            {
                log.debug("Creating manual config connection pool--should only see this " +
                        "message when running unit tests.");
                manualConfigPool = LdapConnectionPool.createPool(config);
            }
            if (manualConfigReadOnlyConn == null)
@@ -159,6 +161,8 @@ class LdapConnections
            log.debug("Obtaining manual config read write connection.");
            if (manualConfigPool == null)
            {
                log.debug("Creating manual config connection pool--should only see this " +
                        "message when running unit tests.");
                manualConfigPool = LdapConnectionPool.createPool(config);
            }
            if (manualConfigReadWriteConn == null)
@@ -205,9 +209,10 @@ class LdapConnections
    @Override
    public void finalize()
    {
        log.debug("Closing manual config connection pool");
        if (manualConfigPool != null)
        {
            log.debug("Closing manual config connection pool--should only see this " +
            		"message when running unit tests.");
            manualConfigPool.close();
        }
    }
+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ public abstract class LdapDAO

    public LDAPConnection getReadOnlyConnection() throws LDAPException
    {
        return connections.getReadWriteConnection();
        return connections.getReadOnlyConnection();
    }

    public LDAPConnection getReadWriteConnection() throws LDAPException