You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2016/01/08 10:32:52 UTC
karaf git commit: KARAF-4166 - Rename karaf.lock.exclusive property
to karaf.lock.slave.block
Repository: karaf
Updated Branches:
refs/heads/master bffcbc032 -> 2831b0f87
KARAF-4166 - Rename karaf.lock.exclusive property to karaf.lock.slave.block
Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/2831b0f8
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/2831b0f8
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/2831b0f8
Branch: refs/heads/master
Commit: 2831b0f873aeefa6444a791b1b832a4130bff090
Parents: bffcbc0
Author: Jean-Baptiste Onofré <jb...@apache.org>
Authored: Fri Jan 8 10:32:22 2016 +0100
Committer: Jean-Baptiste Onofré <jb...@apache.org>
Committed: Fri Jan 8 10:32:22 2016 +0100
----------------------------------------------------------------------
.../base/src/main/resources/resources/etc/system.properties | 4 ++--
.../org/apache/karaf/instance/resources/etc/system.properties | 4 ++--
main/src/main/java/org/apache/karaf/main/ConfigProperties.java | 6 +++---
main/src/main/java/org/apache/karaf/main/Main.java | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/karaf/blob/2831b0f8/assemblies/features/base/src/main/resources/resources/etc/system.properties
----------------------------------------------------------------------
diff --git a/assemblies/features/base/src/main/resources/resources/etc/system.properties b/assemblies/features/base/src/main/resources/resources/etc/system.properties
index 5b0b376..264dbea 100644
--- a/assemblies/features/base/src/main/resources/resources/etc/system.properties
+++ b/assemblies/features/base/src/main/resources/resources/etc/system.properties
@@ -145,5 +145,5 @@ karaf.secured.services = (&(osgi.command.scope=*)(osgi.command.function=*))
#
# By default, the slave instances start but are passive.
# If you want to prevent the slave instances startup, you can use
-# the karaf.lock.exclusive property (false by default):
-# karaf.lock.exclusive=true
\ No newline at end of file
+# the karaf.lock.slave.block property (false by default):
+# karaf.lock.slave.block=true
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/2831b0f8/instance/src/main/resources/org/apache/karaf/instance/resources/etc/system.properties
----------------------------------------------------------------------
diff --git a/instance/src/main/resources/org/apache/karaf/instance/resources/etc/system.properties b/instance/src/main/resources/org/apache/karaf/instance/resources/etc/system.properties
index e996d7e..ab242d9 100644
--- a/instance/src/main/resources/org/apache/karaf/instance/resources/etc/system.properties
+++ b/instance/src/main/resources/org/apache/karaf/instance/resources/etc/system.properties
@@ -138,5 +138,5 @@ karaf.secured.services = (&(osgi.command.scope=*)(osgi.command.function=*))
#
# By default, the slave instances start but are passive.
# If you want to prevent the slave instances startup, you can use
-# the karaf.lock.exclusive property (false by default):
-# karaf.lock.exclusive=true
+# the karaf.lock.slave.block property (false by default):
+# karaf.lock.slave.block=true
http://git-wip-us.apache.org/repos/asf/karaf/blob/2831b0f8/main/src/main/java/org/apache/karaf/main/ConfigProperties.java
----------------------------------------------------------------------
diff --git a/main/src/main/java/org/apache/karaf/main/ConfigProperties.java b/main/src/main/java/org/apache/karaf/main/ConfigProperties.java
index 014b448..7283398 100644
--- a/main/src/main/java/org/apache/karaf/main/ConfigProperties.java
+++ b/main/src/main/java/org/apache/karaf/main/ConfigProperties.java
@@ -111,7 +111,7 @@ public class ConfigProperties {
private static final String PROPERTY_LOCK_LEVEL = "karaf.lock.level";
- private static final String PROPERTY_LOCK_EXCLUSIVE = "karaf.lock.exclusive";
+ private static final String PROPERTY_LOCK_SLAVE_BLOCK = "karaf.lock.slave.block";
private static final String DEFAULT_REPO = "karaf.default.repository";
@@ -161,7 +161,7 @@ public class ConfigProperties {
int lockStartLevel = 1;
int lockDefaultBootLevel = 1;
int lockDelay;
- boolean lockExclusive = false;
+ boolean lockSlaveBlock = false;
int shutdownTimeout = 5 * 60 * 1000;
boolean useLock;
String lockClass;
@@ -226,7 +226,7 @@ public class ConfigProperties {
System.setProperty(Constants.FRAMEWORK_BEGINNING_STARTLEVEL, Integer.toString(this.defaultStartLevel));
this.lockStartLevel = Integer.parseInt(props.getProperty(PROPERTY_LOCK_LEVEL, Integer.toString(lockStartLevel)));
this.lockDelay = Integer.parseInt(props.getProperty(PROPERTY_LOCK_DELAY, DEFAULT_LOCK_DELAY));
- this.lockExclusive = Boolean.parseBoolean(props.getProperty(PROPERTY_LOCK_EXCLUSIVE, "false"));
+ this.lockSlaveBlock = Boolean.parseBoolean(props.getProperty(PROPERTY_LOCK_SLAVE_BLOCK, "false"));
this.props.setProperty(Constants.FRAMEWORK_BEGINNING_STARTLEVEL, Integer.toString(lockDefaultBootLevel));
this.shutdownTimeout = Integer.parseInt(props.getProperty(KARAF_SHUTDOWN_TIMEOUT, Integer.toString(shutdownTimeout)));
this.useLock = Boolean.parseBoolean(props.getProperty(PROPERTY_USE_LOCK, "true"));
http://git-wip-us.apache.org/repos/asf/karaf/blob/2831b0f8/main/src/main/java/org/apache/karaf/main/Main.java
----------------------------------------------------------------------
diff --git a/main/src/main/java/org/apache/karaf/main/Main.java b/main/src/main/java/org/apache/karaf/main/Main.java
index 8719340..ea68aab 100644
--- a/main/src/main/java/org/apache/karaf/main/Main.java
+++ b/main/src/main/java/org/apache/karaf/main/Main.java
@@ -355,7 +355,7 @@ public class Main {
lockCallback.lockLost();
}
} else {
- if (config.lockExclusive) {
+ if (config.lockSlaveBlock) {
LOG.log(Level.SEVERE, "Can't lock, and lock is exclusive");
System.err.println("Can't lock (another instance is running), and lock is exclusive");
System.exit(5);