stratos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From im...@apache.org
Subject git commit: Added logic to check cep stats publisher is enabled before setting cep related properties
Date Tue, 04 Feb 2014 18:03:53 GMT
Updated Branches:
  refs/heads/master f195960a4 -> 4892f6543


Added logic to check cep stats publisher is enabled before setting cep related properties


Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/4892f654
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/4892f654
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/4892f654

Branch: refs/heads/master
Commit: 4892f65434f9df3d1d66ed54d6ceaf9defadc874
Parents: f195960
Author: Imesh Gunaratne <imesh@apache.org>
Authored: Tue Feb 4 12:59:57 2014 -0500
Committer: Imesh Gunaratne <imesh@apache.org>
Committed: Tue Feb 4 12:59:57 2014 -0500

----------------------------------------------------------------------
 .../load/balancer/conf/configurator/CEPConfigurator.java     | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4892f654/components/org.apache.stratos.load.balancer/src/main/java/org/apache/stratos/load/balancer/conf/configurator/CEPConfigurator.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.load.balancer/src/main/java/org/apache/stratos/load/balancer/conf/configurator/CEPConfigurator.java
b/components/org.apache.stratos.load.balancer/src/main/java/org/apache/stratos/load/balancer/conf/configurator/CEPConfigurator.java
index 7d76766..952ce52 100644
--- a/components/org.apache.stratos.load.balancer/src/main/java/org/apache/stratos/load/balancer/conf/configurator/CEPConfigurator.java
+++ b/components/org.apache.stratos.load.balancer/src/main/java/org/apache/stratos/load/balancer/conf/configurator/CEPConfigurator.java
@@ -29,8 +29,10 @@ public class CEPConfigurator {
     public static void configure(LoadBalancerConfiguration configuration) {
         // Set system properties
         System.setProperty("cep.stats.publisher.enabled", String.valueOf(configuration.isCepStatsPublisherEnabled()));
-        System.setProperty("thrift.receiver.ip", configuration.getCepIp());
-        System.setProperty("thrift.receiver.port", String.valueOf(configuration.getCepPort()));
-        System.setProperty("network.partition.id", configuration.getNetworkPartitionId());
+        if(configuration.isCepStatsPublisherEnabled()) {
+            System.setProperty("thrift.receiver.ip", configuration.getCepIp());
+            System.setProperty("thrift.receiver.port", String.valueOf(configuration.getCepPort()));
+            System.setProperty("network.partition.id", configuration.getNetworkPartitionId());
+        }
     }
 }


Mime
View raw message