FELIX-1723: [karaf] slave instances on same host as master instance does not properly lock
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@825220 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/karaf/main/src/main/java/org/apache/felix/karaf/main/DefaultJDBCLock.java b/karaf/main/src/main/java/org/apache/felix/karaf/main/DefaultJDBCLock.java
index 3196d57..0e8505b 100644
--- a/karaf/main/src/main/java/org/apache/felix/karaf/main/DefaultJDBCLock.java
+++ b/karaf/main/src/main/java/org/apache/felix/karaf/main/DefaultJDBCLock.java
@@ -126,7 +126,7 @@
long time = System.currentTimeMillis();
statement = lockConnection.prepareStatement(statements.getLockUpdateStatement(time));
int rows = statement.executeUpdate();
- if (rows == 1) {
+ if (rows >= 1) {
result=true;
}
} catch (Exception e) {
@@ -168,7 +168,7 @@
long time = System.currentTimeMillis();
statement = lockConnection.prepareStatement(statements.getLockUpdateStatement(time));
int rows = statement.executeUpdate();
- if (rows != 1) {
+ if (rows < 1) {
result = false;
}
} catch (Exception ex) {