You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by im...@apache.org on 2015/10/14 10:10:08 UTC
stratos git commit: Fixing application filter logic in message
processors
Repository: stratos
Updated Branches:
refs/heads/stratos-4.1.x 1bc4f53f4 -> 28f3d4508
Fixing application filter logic in message processors
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/28f3d450
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/28f3d450
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/28f3d450
Branch: refs/heads/stratos-4.1.x
Commit: 28f3d45082fd278c4bc32fcbddf5171ad7c933a5
Parents: 1bc4f53
Author: Imesh Gunaratne <im...@apache.org>
Authored: Wed Oct 14 13:39:55 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Wed Oct 14 13:39:55 2015 +0530
----------------------------------------------------------------------
.../topology/ClusterInstanceCreatedMessageProcessor.java | 10 +++++-----
.../topology/ClusterRemovedMessageProcessor.java | 7 +++++++
2 files changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/28f3d450/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/ClusterInstanceCreatedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/ClusterInstanceCreatedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/ClusterInstanceCreatedMessageProcessor.java
index 8fb28cb..ae84a67 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/ClusterInstanceCreatedMessageProcessor.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/ClusterInstanceCreatedMessageProcessor.java
@@ -101,11 +101,6 @@ public class ClusterInstanceCreatedMessageProcessor extends MessageProcessor {
Cluster cluster = service.getCluster(event.getClusterId());
- // Apply application filter
- if(TopologyApplicationFilter.apply(cluster.getAppId())) {
- return false;
- }
-
if (cluster == null) {
if (log.isDebugEnabled()) {
log.debug(String.format("Cluster not exists in service: [service] %s [cluster] %s", event.getServiceName(),
@@ -113,6 +108,11 @@ public class ClusterInstanceCreatedMessageProcessor extends MessageProcessor {
}
return false;
} else {
+ // Apply application filter
+ if(TopologyApplicationFilter.apply(cluster.getAppId())) {
+ return false;
+ }
+
// Apply changes to the topology
ClusterInstance clusterInstance = event.getClusterInstance();
if (cluster.getInstanceContexts(clusterInstance.getInstanceId()) != null) {
http://git-wip-us.apache.org/repos/asf/stratos/blob/28f3d450/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/ClusterRemovedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/ClusterRemovedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/ClusterRemovedMessageProcessor.java
index d38ada2..f84cece 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/ClusterRemovedMessageProcessor.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/ClusterRemovedMessageProcessor.java
@@ -107,6 +107,13 @@ public class ClusterRemovedMessageProcessor extends MessageProcessor {
} else {
Cluster cluster = service.getCluster(event.getClusterId());
+ if(cluster == null) {
+ if (log.isDebugEnabled()) {
+ log.debug(String.format("Cluster not exists in service: [service] %s [cluster] %s",
+ event.getServiceName(), event.getClusterId()));
+ }
+ return false;
+ }
// Apply application filter
if(TopologyApplicationFilter.apply(cluster.getAppId())) {