brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [2/3] incubator-brooklyn git commit: Fix jboss7 serviceUp
Date Mon, 21 Sep 2015 16:06:24 GMT
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 <aled.sage@gmail.com>
Authored: Sat Sep 19 15:41:05 2015 +0100
Committer: Aled Sage <aled.sage@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());
     }
     


Mime
View raw message