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 2013/11/08 02:37:07 UTC

[2/2] git commit: Introduced new component load.balancer.extension.api and fixed service component definitions

Introduced new component load.balancer.extension.api and fixed service component definitions


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

Branch: refs/heads/master
Commit: 9ac61e4eb48a3cfe5d19cebb26fc0edb19c45fbd
Parents: d558b47
Author: Imesh Gunaratne <im...@apache.org>
Authored: Fri Nov 8 07:06:47 2013 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Fri Nov 8 07:06:47 2013 +0530

----------------------------------------------------------------------
 .../LoadBalancerCommonServiceComponent.java     |   4 +-
 .../common/topology/TopologyReceiver.java       |  70 ++++++++++++
 .../pom.xml                                     |  57 ++++++++++
 .../balancer/extension/api/LoadBalancer.java    |  50 ++++++++
 .../extension/api/LoadBalancerExtension.java    | 111 ++++++++++++++++++
 ...oadBalancerExtensionAPIServiceComponent.java |  43 +++++++
 .../internal/LoadBalancerServiceComponent.java  |   2 +-
 components/pom.xml                              | 113 ++++++++++---------
 8 files changed, 392 insertions(+), 58 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9ac61e4e/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/internal/LoadBalancerCommonServiceComponent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/internal/LoadBalancerCommonServiceComponent.java b/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/internal/LoadBalancerCommonServiceComponent.java
index a68ae4e..8aa811d 100644
--- a/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/internal/LoadBalancerCommonServiceComponent.java
+++ b/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/internal/LoadBalancerCommonServiceComponent.java
@@ -23,7 +23,9 @@ import org.apache.commons.logging.LogFactory;
 import org.osgi.service.component.ComponentContext;
 
 /**
- *
+ * @scr.component name="org.apache.stratos.load.balancer.common.internal.LoadBalancerCommonServiceComponent" immediate="true"
+ * @scr.reference name="config.context.service"
+ * interface="org.wso2.carbon.utils.ConfigurationContextService" cardinality="1..1"
  */
 public class LoadBalancerCommonServiceComponent {
 

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9ac61e4e/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/topology/TopologyReceiver.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/topology/TopologyReceiver.java b/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/topology/TopologyReceiver.java
new file mode 100644
index 0000000..88958b5
--- /dev/null
+++ b/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/topology/TopologyReceiver.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.stratos.load.balancer.common.topology;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.messaging.broker.subscribe.TopicSubscriber;
+import org.apache.stratos.messaging.message.processor.MessageProcessorChain;
+import org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator;
+import org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageReceiver;
+import org.apache.stratos.messaging.util.Constants;
+
+/**
+ * A thread for receiving topology information from message broker.
+ */
+public class TopologyReceiver implements Runnable {
+    private static final Log log = LogFactory.getLog(TopologyReceiver.class);
+    private TopologyEventMessageDelegator messageDelegator;
+
+    public TopologyReceiver() {
+        this.messageDelegator = new TopologyEventMessageDelegator();
+    }
+
+    public TopologyReceiver(TopologyEventMessageDelegator messageDelegator) {
+        this.messageDelegator = messageDelegator;
+    }
+
+    @Override
+    public void run() {
+        try {
+                // Start topic subscriber thread
+                TopicSubscriber topicSubscriber = new TopicSubscriber(Constants.TOPOLOGY_TOPIC);
+                topicSubscriber.setMessageListener(new TopologyEventMessageReceiver());
+                Thread subscriberThread = new Thread(topicSubscriber);
+                subscriberThread.start();
+                if (log.isDebugEnabled()) {
+                    log.debug("Topology event message receiver thread started");
+                }
+
+                // Start topology message receiver thread
+                Thread receiverThread = new Thread(messageDelegator);
+                receiverThread.start();
+                if (log.isDebugEnabled()) {
+                    log.debug("Topology message processor thread started");
+                }
+        }
+        catch (Exception e) {
+            if(log.isErrorEnabled()) {
+                log.error("Topology receiver failed", e);
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9ac61e4e/components/org.apache.stratos.load.balancer.extension.api/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.load.balancer.extension.api/pom.xml b/components/org.apache.stratos.load.balancer.extension.api/pom.xml
new file mode 100644
index 0000000..9ce6fd3
--- /dev/null
+++ b/components/org.apache.stratos.load.balancer.extension.api/pom.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.apache.stratos</groupId>
+    <artifactId>org.apache.stratos.load.balancer.extension.api</artifactId>
+    <version>4.0.0-SNAPSHOT</version>
+    <name>Apache Stratos - Load Balancer - Extension API</name>
+    <description>An extension API for integrating third party load balancers with Apache Stratos.</description>
+
+    <repositories>
+        <repository>
+            <id>wso2-nexus</id>
+            <name>WSO2 internal Repository</name>
+            <url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url>
+            <releases>
+                <enabled>true</enabled>
+                <updatePolicy>daily</updatePolicy>
+                <checksumPolicy>ignore</checksumPolicy>
+            </releases>
+        </repository>
+    </repositories>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.stratos</groupId>
+            <artifactId>org.apache.stratos.messaging</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.stratos</groupId>
+            <artifactId>org.apache.stratos.load.balancer.common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9ac61e4e/components/org.apache.stratos.load.balancer.extension.api/src/main/java/org/apache/stratos/load/balancer/extension/api/LoadBalancer.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.load.balancer.extension.api/src/main/java/org/apache/stratos/load/balancer/extension/api/LoadBalancer.java b/components/org.apache.stratos.load.balancer.extension.api/src/main/java/org/apache/stratos/load/balancer/extension/api/LoadBalancer.java
new file mode 100644
index 0000000..9bd3881
--- /dev/null
+++ b/components/org.apache.stratos.load.balancer.extension.api/src/main/java/org/apache/stratos/load/balancer/extension/api/LoadBalancer.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.stratos.load.balancer.extension.api;
+
+import org.apache.stratos.messaging.domain.topology.Topology;
+
+/**
+ *  A generic load balancer life-cycle definition.
+ */
+public interface LoadBalancer {
+
+    /**
+     * Start a new load balancer instance.
+     */
+    void start();
+
+    /**
+     * Stop the running load balancer instance.
+     */
+    void stop();
+
+    /**
+     * Configure the load balancer using the given topology.
+     * @param topology
+     */
+    void configure(Topology topology);
+
+    /**
+     * Reload load balancer configuration using the given topology without interrupting the incoming requests.
+     * @param topology
+     */
+    void reload(Topology topology);
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9ac61e4e/components/org.apache.stratos.load.balancer.extension.api/src/main/java/org/apache/stratos/load/balancer/extension/api/LoadBalancerExtension.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.load.balancer.extension.api/src/main/java/org/apache/stratos/load/balancer/extension/api/LoadBalancerExtension.java b/components/org.apache.stratos.load.balancer.extension.api/src/main/java/org/apache/stratos/load/balancer/extension/api/LoadBalancerExtension.java
new file mode 100644
index 0000000..fd164b1
--- /dev/null
+++ b/components/org.apache.stratos.load.balancer.extension.api/src/main/java/org/apache/stratos/load/balancer/extension/api/LoadBalancerExtension.java
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.stratos.load.balancer.extension.api;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.load.balancer.common.topology.TopologyReceiver;
+import org.apache.stratos.messaging.event.Event;
+import org.apache.stratos.messaging.event.topology.*;
+import org.apache.stratos.messaging.message.processor.MessageProcessorChain;
+import org.apache.stratos.messaging.message.processor.topology.TopologyEventProcessorChain;
+import org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator;
+import org.apache.stratos.messaging.message.receiver.topology.TopologyManager;
+
+/**
+ * Load balancer extension thread for executing load balancer life-cycle according to the topology updates
+ * received from the message broker.
+ */
+public class LoadBalancerExtension implements Runnable {
+    private static final Log log = LogFactory.getLog(LoadBalancerExtension.class);
+
+    private LoadBalancer loadBalancer;
+
+    public LoadBalancerExtension(LoadBalancer loadBalancer) {
+        this.loadBalancer = loadBalancer;
+    }
+
+    @Override
+    public void run() {
+        try {
+            // Start topology receiver
+            TopologyReceiver topologyReceiver = new TopologyReceiver(createMessageDelegator());
+            Thread thread = new Thread(topologyReceiver);
+            thread.start();
+        }
+        catch (Exception e){
+            if(log.isErrorEnabled()) {
+                log.error(e);
+            }
+            loadBalancer.stop();
+        }
+    }
+
+    private TopologyEventMessageDelegator createMessageDelegator() {
+        TopologyEventProcessorChain processorChain = createEventProcessorChain();
+        TopologyEventMessageDelegator messageDelegator = new TopologyEventMessageDelegator(processorChain);
+        messageDelegator.addCompleteTopologyEventListener(new CompleteTopologyEventListener() {
+            @Override
+            protected void onEvent(Event event) {
+                // Configure load balancer
+                loadBalancer.configure(TopologyManager.getTopology());
+
+                // Start load balancer
+                loadBalancer.start();
+            }
+        });
+        return  messageDelegator;
+    }
+
+    private TopologyEventProcessorChain createEventProcessorChain() {
+        TopologyEventProcessorChain processorChain = new TopologyEventProcessorChain();
+        processorChain.addEventListener(new MemberActivatedEventListener() {
+            @Override
+            protected void onEvent(Event event) {
+                loadBalancer.reload(TopologyManager.getTopology());
+            }
+        });
+        processorChain.addEventListener(new MemberSuspendedEventListener() {
+            @Override
+            protected void onEvent(Event event) {
+                loadBalancer.reload(TopologyManager.getTopology());
+            }
+        });
+        processorChain.addEventListener(new MemberTerminatedEventListener() {
+            @Override
+            protected void onEvent(Event event) {
+                loadBalancer.reload(TopologyManager.getTopology());
+            }
+        });
+        processorChain.addEventListener(new ClusterRemovedEventListener() {
+            @Override
+            protected void onEvent(Event event) {
+                loadBalancer.reload(TopologyManager.getTopology());
+            }
+        });
+        processorChain.addEventListener(new ServiceRemovedEventListener() {
+            @Override
+            protected void onEvent(Event event) {
+                loadBalancer.reload(TopologyManager.getTopology());
+            }
+        });
+        return processorChain;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9ac61e4e/components/org.apache.stratos.load.balancer.extension.api/src/main/java/org/apache/stratos/load/balancer/extension/api/internal/LoadBalancerExtensionAPIServiceComponent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.load.balancer.extension.api/src/main/java/org/apache/stratos/load/balancer/extension/api/internal/LoadBalancerExtensionAPIServiceComponent.java b/components/org.apache.stratos.load.balancer.extension.api/src/main/java/org/apache/stratos/load/balancer/extension/api/internal/LoadBalancerExtensionAPIServiceComponent.java
new file mode 100644
index 0000000..424959a
--- /dev/null
+++ b/components/org.apache.stratos.load.balancer.extension.api/src/main/java/org/apache/stratos/load/balancer/extension/api/internal/LoadBalancerExtensionAPIServiceComponent.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.stratos.load.balancer.extension.api.internal;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.service.component.ComponentContext;
+
+/**
+ * @scr.component name="org.apache.stratos.load.balancer.extension.api.internal.LoadBalancerExtensionAPIServiceComponent" immediate="true"
+ * @scr.reference name="config.context.service"
+ * interface="org.wso2.carbon.utils.ConfigurationContextService" cardinality="1..1"
+ */
+public class LoadBalancerExtensionAPIServiceComponent {
+
+    private static final Log log = LogFactory.getLog(LoadBalancerExtensionAPIServiceComponent.class);
+
+    protected void activate(ComponentContext context) {
+        try {
+            if(log.isDebugEnabled()) {
+                log.debug("Load Balancer Extension API Service bundle activated");
+            }
+        } catch (Exception e) {
+            log.error("Could not activate Load Balancer Extension API Service bundle", e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9ac61e4e/components/org.apache.stratos.load.balancer/src/main/java/org/apache/stratos/load/balancer/internal/LoadBalancerServiceComponent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.load.balancer/src/main/java/org/apache/stratos/load/balancer/internal/LoadBalancerServiceComponent.java b/components/org.apache.stratos.load.balancer/src/main/java/org/apache/stratos/load/balancer/internal/LoadBalancerServiceComponent.java
index afcc38a..440a6fb 100644
--- a/components/org.apache.stratos.load.balancer/src/main/java/org/apache/stratos/load/balancer/internal/LoadBalancerServiceComponent.java
+++ b/components/org.apache.stratos.load.balancer/src/main/java/org/apache/stratos/load/balancer/internal/LoadBalancerServiceComponent.java
@@ -53,7 +53,7 @@ import java.util.Map;
 import java.util.Set;
 
 /**
- * @scr.component name="org.apache.stratos.load.balancer.endpoint" immediate="true"
+ * @scr.component name="org.apache.stratos.load.balancer.internal.LoadBalancerServiceComponent" immediate="true"
  * @scr.reference name="configuration.context.service"
  * interface="org.wso2.carbon.utils.ConfigurationContextService"
  * cardinality="1..1" policy="dynamic"

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9ac61e4e/components/pom.xml
----------------------------------------------------------------------
diff --git a/components/pom.xml b/components/pom.xml
index bd1ce2f..b97402e 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -40,66 +40,67 @@
         <module>org.apache.stratos.common</module>
         <!-- Messaging -->
         <module>org.apache.stratos.messaging</module>
-		<!-- Autoscaler -->
+        <!-- Autoscaler -->
         <module>org.apache.stratos.autoscaler</module>
-		<!-- CC -->
-		<module>org.apache.stratos.cloud.controller</module>
-		<!-- ADC -->
-		<module>org.apache.stratos.adc.topology.mgt</module>
-		<module>org.apache.stratos.adc.mgt</module>
-		<module>org.apache.stratos.deployment</module>
-		<!-- CLI -->
-		<module>org.apache.stratos.cli</module>
-		<!-- ELB -->
+        <!-- CC -->
+        <module>org.apache.stratos.cloud.controller</module>
+        <!-- ADC -->
+        <module>org.apache.stratos.adc.topology.mgt</module>
+        <module>org.apache.stratos.adc.mgt</module>
+        <module>org.apache.stratos.deployment</module>
+        <!-- CLI -->
+        <module>org.apache.stratos.cli</module>
+        <!-- Load Balancer -->
         <module>org.apache.stratos.load.balancer.common</module>
         <module>org.apache.stratos.load.balancer</module>
-		<!-- Tenant Mgt -->
-		<module>org.apache.stratos.register.ui</module>
-		<module>org.apache.stratos.tenant.mgt.core</module>
-		<module>org.apache.stratos.tenant.mgt</module>
-		<module>org.apache.stratos.tenant.mgt.ui</module>
-		<module>org.apache.stratos.tenant.mgt.email.sender</module>
-		<!-- Tenant Activity -->
-		<module>org.apache.stratos.tenant.activity</module>	
-		<module>org.apache.stratos.tenant.activity.ui</module>
-		<!-- Account Mgt -->
-		<module>org.apache.stratos.account.mgt</module>
-		<module>org.apache.stratos.account.mgt.ui</module>
-		<module>org.apache.stratos.email.sender</module>
-		<!-- Domain Validation -->
-		<module>org.apache.stratos.validate.domain</module>
-                <module>org.apache.stratos.validate.domain.ui</module>
-		<!-- Throttling -->
-		<module>org.apache.stratos.throttling.agent</module>
-		<module>org.apache.stratos.throttling.manager</module>
-		<module>org.apache.stratos.throttling.ui</module>
-		<!-- Redirector -->
-		<module>org.apache.stratos.sso.redirector.ui</module>
-		<module>org.apache.stratos.redirector.servlet</module>
-		<module>org.apache.stratos.redirector.servlet.ui</module>
-		<!-- Status Monitor -->
-		<module>org.apache.stratos.status.monitor.core</module>
-		<module>org.apache.stratos.status.monitor</module>
-		<module>org.apache.stratos.status.monitor.agent</module>
-		<module>org.apache.stratos.status.monitor.ui</module>
-		<!-- Usage -->
-		<module>org.apache.stratos.usage.agent</module>
-		<module>org.apache.stratos.usage</module>		
-		<module>org.apache.stratos.usage.summary.helper</module>
-		<module>org.apache.stratos.usage.ui</module>
+        <module>org.apache.stratos.load.balancer.extension.api</module>
+        <!-- Tenant Mgt -->
+        <module>org.apache.stratos.register.ui</module>
+        <module>org.apache.stratos.tenant.mgt.core</module>
+        <module>org.apache.stratos.tenant.mgt</module>
+        <module>org.apache.stratos.tenant.mgt.ui</module>
+        <module>org.apache.stratos.tenant.mgt.email.sender</module>
+        <!-- Tenant Activity -->
+        <module>org.apache.stratos.tenant.activity</module>
+        <module>org.apache.stratos.tenant.activity.ui</module>
+        <!-- Account Mgt -->
+        <module>org.apache.stratos.account.mgt</module>
+        <module>org.apache.stratos.account.mgt.ui</module>
+        <module>org.apache.stratos.email.sender</module>
+        <!-- Domain Validation -->
+        <module>org.apache.stratos.validate.domain</module>
+        <module>org.apache.stratos.validate.domain.ui</module>
+        <!-- Throttling -->
+        <module>org.apache.stratos.throttling.agent</module>
+        <module>org.apache.stratos.throttling.manager</module>
+        <module>org.apache.stratos.throttling.ui</module>
+        <!-- Redirector -->
+        <module>org.apache.stratos.sso.redirector.ui</module>
+        <module>org.apache.stratos.redirector.servlet</module>
+        <module>org.apache.stratos.redirector.servlet.ui</module>
+        <!-- Status Monitor -->
+        <module>org.apache.stratos.status.monitor.core</module>
+        <module>org.apache.stratos.status.monitor</module>
+        <module>org.apache.stratos.status.monitor.agent</module>
+        <module>org.apache.stratos.status.monitor.ui</module>
+        <!-- Usage -->
+        <module>org.apache.stratos.usage.agent</module>
+        <module>org.apache.stratos.usage</module>
+        <module>org.apache.stratos.usage.summary.helper</module>
+        <module>org.apache.stratos.usage.ui</module>
 
-		<module>org.apache.stratos.tenant.dispatcher</module>
-		<module>org.apache.stratos.keystore.mgt</module>
-		<module>org.apache.stratos.activation</module>
-		<module>org.apache.stratos.cartridge.mgt.ui</module>
-		<!-- Theme mgt -->
-		<module>org.apache.stratos.theme.mgt.ui</module>
-		<module>org.apache.stratos.theme.mgt</module>
-		<!--Logging mgt-->
-                <module>org.apache.stratos.logging.view.ui</module>
-                <!-- RESTful admin services -->
-                <module>org.apache.stratos.rest.endpoint</module>
-	    </modules>
+        <module>org.apache.stratos.tenant.dispatcher</module>
+        <module>org.apache.stratos.keystore.mgt</module>
+        <module>org.apache.stratos.activation</module>
+        <module>org.apache.stratos.cartridge.mgt.ui</module>
+        <!-- Theme mgt -->
+        <module>org.apache.stratos.theme.mgt.ui</module>
+        <module>org.apache.stratos.theme.mgt</module>
+        <!--Logging mgt-->
+        <module>org.apache.stratos.logging.view.ui</module>
+        <!-- RESTful admin services -->
+        <module>org.apache.stratos.rest.endpoint</module>
+    </modules>
 	    
 	    <build>
 	        <plugins>