activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject git commit: https://issues.apache.org/jira/browse/AMQ-4705 - add check for lock file exist and use error in place of warn if lock is lost
Date Tue, 03 Sep 2013 20:24:38 GMT
Updated Branches:
  refs/heads/trunk d2f4d76f8 -> 74b35bc5d


https://issues.apache.org/jira/browse/AMQ-4705 - add check for lock file exist and use error
in place of warn if lock is lost


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/74b35bc5
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/74b35bc5
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/74b35bc5

Branch: refs/heads/trunk
Commit: 74b35bc5dd75edb9d9e3250a4362b85d78023d76
Parents: d2f4d76
Author: gtully <gary.tully@gmail.com>
Authored: Tue Sep 3 21:22:20 2013 +0100
Committer: gtully <gary.tully@gmail.com>
Committed: Tue Sep 3 21:24:09 2013 +0100

----------------------------------------------------------------------
 .../java/org/apache/activemq/broker/LockableServiceSupport.java    | 2 +-
 .../src/main/java/org/apache/activemq/util/LockFile.java           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/74b35bc5/activemq-broker/src/main/java/org/apache/activemq/broker/LockableServiceSupport.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/LockableServiceSupport.java
b/activemq-broker/src/main/java/org/apache/activemq/broker/LockableServiceSupport.java
index f47b773..2475201 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/LockableServiceSupport.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/LockableServiceSupport.java
@@ -131,7 +131,7 @@ public abstract class LockableServiceSupport extends ServiceSupport implements
L
 
     protected void stopBroker() {
         // we can no longer keep the lock so lets fail
-        LOG.info(brokerService.getBrokerName() + ", no longer able to keep the exclusive
lock so giving up being a master");
+        LOG.error(brokerService.getBrokerName() + ", no longer able to keep the exclusive
lock so giving up being a master");
         try {
             if( brokerService.isRestartAllowed() ) {
                 brokerService.requestRestart();

http://git-wip-us.apache.org/repos/asf/activemq/blob/74b35bc5/activemq-broker/src/main/java/org/apache/activemq/util/LockFile.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/util/LockFile.java b/activemq-broker/src/main/java/org/apache/activemq/util/LockFile.java
index ace6181..8fe512a 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/util/LockFile.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/util/LockFile.java
@@ -140,7 +140,7 @@ public class LockFile {
     }
 
     public boolean keepAlive() {
-        return lock != null && lock.isValid();
+        return lock != null && lock.isValid() && file.exists();
     }
 
 }


Mime
View raw message