From 71154628f84b0587f2c3b760c7165144d6b3f755 Mon Sep 17 00:00:00 2001 From: James Strachan Date: Mon, 24 Jul 2006 16:31:36 +0000 Subject: [PATCH] added cleaner logging, particularly when starting a slave (its good to tell the user that its looking for the exclusive lock so they know the broker is not just hanging for nothing :) git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@425114 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/activemq/store/jdbc/DefaultDatabaseLocker.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java b/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java index 48374fa9f5..3b319ef3fa 100644 --- a/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java @@ -46,14 +46,13 @@ public class DefaultDatabaseLocker implements DatabaseLocker { } public void start() throws Exception { - log.debug("Attempting to acquire exclusive lock on the database"); - connection = dataSource.getConnection(); connection.setAutoCommit(false); PreparedStatement statement = connection.prepareStatement(statements.getLockCreateStatement()); while (true) { try { + log.info("Attempting to acquire the exclusive lock to become the Master broker"); boolean answer = statement.execute(); if (answer) { break; @@ -62,7 +61,7 @@ public class DefaultDatabaseLocker implements DatabaseLocker { catch (Exception e) { log.error("Failed to acquire lock: " + e, e); } - log.info("Sleeping for " + sleepTime + " milli(s) before trying again to get the lock..."); + log.debug("Sleeping for " + sleepTime + " milli(s) before trying again to get the lock..."); Thread.sleep(sleepTime); }