You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by al...@apache.org on 2015/09/21 18:06:24 UTC
[2/3] incubator-brooklyn git commit: Fix jboss7 serviceUp
Fix jboss7 serviceUp
Previously, serviceUp was never set to true, for two reasons:
1. because connectServiceUpIsRunning was not called, nothing was
unsetting the service-not-up-indicator for SERVICE_PROCESS_IS_RUNNING
2. because the service-not-up-indicator for MANAGEMENT_URL_UP said
suppressDuplicates=true, then it checked if the map was equal to
the “old” map before publishing. But the map was the same object,
and that object had been modified in-place. So the object was
always equal to itself. It therefore never did an emit(), so the
enricher that listened to it to set serviceUp never fired.
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/3b5b235f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/3b5b235f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/3b5b235f
Branch: refs/heads/master
Commit: 3b5b235f4b5d5ba71eb69722001b21d9f8e30260
Parents: 10c6576
Author: Aled Sage <al...@gmail.com>
Authored: Sat Sep 19 15:41:05 2015 +0100
Committer: Aled Sage <al...@gmail.com>
Committed: Mon Sep 21 14:31:51 2015 +0100
----------------------------------------------------------------------
.../org/apache/brooklyn/entity/webapp/jboss/JBoss7ServerImpl.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/3b5b235f/software/webapp/src/main/java/org/apache/brooklyn/entity/webapp/jboss/JBoss7ServerImpl.java
----------------------------------------------------------------------
diff --git a/software/webapp/src/main/java/org/apache/brooklyn/entity/webapp/jboss/JBoss7ServerImpl.java b/software/webapp/src/main/java/org/apache/brooklyn/entity/webapp/jboss/JBoss7ServerImpl.java
index 09f09c1..51e624d 100644
--- a/software/webapp/src/main/java/org/apache/brooklyn/entity/webapp/jboss/JBoss7ServerImpl.java
+++ b/software/webapp/src/main/java/org/apache/brooklyn/entity/webapp/jboss/JBoss7ServerImpl.java
@@ -126,10 +126,11 @@ public class JBoss7ServerImpl extends JavaWebAppSoftwareProcessImpl implements J
}
protected void connectServiceUp() {
+ connectServiceUpIsRunning();
+
addEnricher(Enrichers.builder().updatingMap(Attributes.SERVICE_NOT_UP_INDICATORS)
.from(MANAGEMENT_URL_UP)
.computing(Functionals.ifNotEquals(true).value("Management URL not reachable") )
- .suppressDuplicates(true)
.build());
}