Author: jstrachan
Date: Mon Jul 24 09:31:36 2006
New Revision: 425114
URL: http://svn.apache.org/viewvc?rev=425114&view=rev
Log:
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 :)
Modified:
incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java
Modified:
incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java
URL:
http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java?rev=425114&r1=425113&r2=425114&view=diff
==============================================================================
---
incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java
(original)
+++
incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java
Mon Jul 24 09:31:36 2006
@@ -46,14 +46,13 @@
}
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 @@
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);
}