You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2013/10/03 00:45:51 UTC

[7/9] git commit: updated refs/heads/spring-modularization to 8cf00de

Spring Modularization

ACS is now comprised of a hierarchy of spring application contexts.
Each plugin can contribute configuration files to add to an existing
module or create it's own module.

Additionally, for the mgmt server, ACS custom AOP is no longer used
and instead we use Spring AOP to manage interceptors.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/67186429
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/67186429
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/67186429

Branch: refs/heads/spring-modularization
Commit: 67186429e14af55172766dd61d978cd47cd52436
Parents: 8466fad
Author: Darren Shepherd <da...@godaddy.com>
Authored: Tue Sep 17 16:26:13 2013 -0700
Committer: Darren Shepherd <da...@gmail.com>
Committed: Wed Oct 2 15:41:04 2013 -0700

----------------------------------------------------------------------
 .../cloudstack/api-planner/module.properties    |   2 +
 .../api-planner/spring-api-planner-context.xml  |  34 ++
 .../apache/cloudstack/context/CallContext.java  |   2 +-
 .../cloudstack/webApplicationContext.xml        |  32 ++
 client/tomcatconf/log4j-cloud.xml.in            |   8 +
 .../cloudstack/allocator/module.properties      |   2 +
 .../allocator/spring-core-allocator-context.xml |  32 ++
 ...-lifecycle-allocator-context-inheritable.xml |  42 +++
 .../META-INF/cloudstack/api/module.properties   |   2 +
 ...g-core-lifecycle-api-context-inheritable.xml |  53 +++
 .../cloudstack/backend/module.properties        |   2 +
 .../cloudstack/bootstrap/module.properties      |   1 +
 .../spring-bootstrap-context-inheritable.xml    |  39 +++
 .../bootstrap/spring-bootstrap-context.xml      |  32 ++
 .../cloudstack/compute/module.properties        |   2 +
 ...re-lifecycle-compute-context-inheritable.xml |  45 +++
 .../META-INF/cloudstack/core/module.properties  |   2 +
 .../cloudstack/core/spring-core-context.xml     |  36 +++
 ...-core-lifecycle-core-context-inheritable.xml |  41 +++
 .../core/spring-core-registry-core-context.xml  | 187 +++++++++++
 .../cloudstack/discoverer/module.properties     |   2 +
 ...lifecycle-discoverer-context-inheritable.xml |  35 ++
 .../cloudstack/network/module.properties        |   2 +
 ...re-lifecycle-network-context-inheritable.xml |  58 ++++
 .../cloudstack/planner/module.properties        |   2 +
 ...re-lifecycle-planner-context-inheritable.xml |  41 +++
 .../cloudstack/storage/module.properties        |   2 +
 ...ng-lifecycle-storage-context-inheritable.xml |  60 ++++
 .../cloudstack/system/module.properties         |   2 +
 .../spring-core-system-context-inheritable.xml  |  54 ++++
 .../system/spring-core-system-context.xml       |  50 +++
 .../core/spring-engine-api-core-context.xml     |  44 +++
 ...pring-engine-components-api-core-context.xml |  30 ++
 ...spring-engine-orchestration-core-context.xml |  71 ++++
 .../spring-engine-schema-core-daos-context.xml  | 321 +++++++++++++++++++
 ...ng-engine-schema-system-checkers-context.xml |  34 ++
 .../cloud/upgrade/DatabaseUpgradeChecker.java   |   4 +-
 ...spring-engine-storage-cache-core-context.xml |  38 +++
 ...g-engine-storage-datamotion-core-context.xml |  45 +++
 ...spring-engine-storage-image-core-context.xml |  45 +++
 .../core/spring-engine-storage-core-context.xml |  63 ++++
 .../storage-allocator/module.properties         |   2 +
 ...engine-storage-storage-allocator-context.xml |  49 +++
 ...ing-engine-storage-snapshot-core-context.xml |  44 +++
 .../provider/DataStoreProviderManagerImpl.java  | 109 +++++--
 ...pring-engine-storage-volume-core-context.xml |  49 +++
 .../spring-framework-cluster-core-context.xml   |  36 +++
 ...ork-config-bootstrap-context-inheritable.xml |  38 +++
 ...pring-framework-config-bootstrap-context.xml |  51 +++
 .../framework/config/ConfigDepotAdmin.java      |   2 +
 .../config/dao/ConfigurationDaoImpl.java        |   9 +
 .../framework/config/impl/ConfigDepotImpl.java  |  98 ++++--
 .../config/impl/ConfigDepotAdminTest.java       |   1 +
 .../spring-framework-db-system-context.xml      |  32 ++
 .../db/src/com/cloud/utils/db/Transaction.java  |   4 +-
 .../utils/db/TransactionContextInterceptor.java |  39 +++
 .../utils/db/TransactionContextListener.java    |  41 +++
 .../core/spring-framework-ipc-core-context.xml  |  59 ++++
 .../core/spring-framework-jobs-core-context.xml |  48 +++
 framework/pom.xml                               |   2 +
 framework/spring/lifecycle/pom.xml              |  34 ++
 .../spring/lifecycle/AbstractBeanCollector.java | 113 +++++++
 .../lifecycle/AbstractSmartLifeCycle.java       |  53 +++
 .../lifecycle/CloudStackExtendedLifeCycle.java  | 169 ++++++++++
 .../CloudStackExtendedLifeCycleStart.java       |  49 +++
 .../spring/lifecycle/CloudStackLog4jSetup.java  |  56 ++++
 .../spring/lifecycle/ConfigDepotLifeCycle.java  |  47 +++
 .../spring/lifecycle/registry/DumpRegistry.java |  77 +++++
 .../lifecycle/registry/ExtensionRegistry.java   | 245 ++++++++++++++
 .../registry/PluggableServiceLifecycle.java     |  53 +++
 .../lifecycle/registry/RegistryLifecycle.java   | 144 +++++++++
 framework/spring/module/pom.xml                 |  50 +++
 .../context/ResourceApplicationContext.java     |  55 ++++
 .../module/factory/CloudStackSpringContext.java | 137 ++++++++
 .../factory/ModuleBasedContextFactory.java      |  84 +++++
 .../module/locator/ModuleDefinitionLocator.java |  36 +++
 .../impl/ClasspathModuleDefinitionLocator.java  |  62 ++++
 .../spring/module/model/ModuleDefinition.java   |  48 +++
 .../module/model/ModuleDefinitionSet.java       |  32 ++
 .../model/impl/DefaultModuleDefinition.java     | 167 ++++++++++
 .../model/impl/DefaultModuleDefinitionSet.java  | 243 ++++++++++++++
 .../cloudstack/spring/module/util/Main.java     |  58 ++++
 .../spring/module/util/ModuleLocationUtils.java |  53 +++
 .../web/CloudStackContextLoaderListener.java    |  75 +++++
 .../module/model/impl/defaults-context.xml      |  28 ++
 .../spring/module/factory/InitTest.java         |  39 +++
 .../factory/ModuleBasedContextFactoryTest.java  | 121 +++++++
 ...ClasspathModuleDefinitionSetLocatorTest.java |  40 +++
 .../model/impl/DefaultModuleDefinitionTest.java | 131 ++++++++
 .../resources/testfiles/all/defaults.properties |  18 ++
 .../testfiles/all/empty-context-inheritable.xml |  26 ++
 .../resources/testfiles/all/empty-context.xml   |  26 ++
 .../all/empty2-context-inheritable.xml          |  26 ++
 .../resources/testfiles/all/empty2-context.xml  |  26 ++
 .../resources/testfiles/all/module.properties   |  17 +
 .../testfiles/all/test2-defaults.properties     |  17 +
 .../testfiles/badname/module.properties         |  17 +
 .../testfiles/blankname/module.properties       |  18 ++
 .../resources/testfiles/good/empty-context.xml  |  26 ++
 .../resources/testfiles/good/module.properties  |  17 +
 .../testfiles/missingname/module.properties     |  17 +
 .../testfiles/wrongname/module.properties       |  17 +
 .../testhierarchy/base/module.properties        |  17 +
 .../base/test-context-inheritable.xml           |  28 ++
 .../testhierarchy/base/test-context.xml         |  34 ++
 .../testhierarchy/child1-1/module.properties    |  18 ++
 .../testhierarchy/child1-1/test-context.xml     |  34 ++
 .../testhierarchy/child1/module.properties      |  18 ++
 .../child1/test-context-override.xml            |  30 ++
 .../testhierarchy/child1/test-context.xml       |  38 +++
 .../testhierarchy/child2/module.properties      |  18 ++
 .../testhierarchy/child2/test-context.xml       |  33 ++
 .../testhierarchy/orphan1/module.properties     |  18 ++
 .../testhierarchy/orphan1/test-context.xml      |  30 ++
 .../acl-static-role-based/module.properties     |   2 +
 .../spring-acl-static-role-based-context.xml    |  34 ++
 .../explicit-dedication/module.properties       |   2 +
 .../spring-explicit-dedication-context.xml      |  36 +++
 .../host-anti-affinity/module.properties        |   2 +
 .../spring-host-anti-affinity-context.xml       |  37 +++
 .../discovery/ApiDiscoveryServiceImpl.java      |  65 +++-
 .../cloudstack/discovery/ApiDiscoveryTest.java  |   2 +-
 .../cloudstack/rate-limit/module.properties     |   2 +
 .../rate-limit/spring-rate-limit-context.xml    |  32 ++
 .../spring-dedicated-resources-core-context.xml |  33 ++
 .../implicit-dedication/module.properties       |   2 +
 .../spring-implicit-dedication-context.xml      |  25 ++
 .../user-concentrated-pod/module.properties     |   2 +
 .../spring-user-concentrated-pod-context.xml    |  35 ++
 .../host-allocator-random/module.properties     |   2 +
 .../spring-host-allocator-random-context.xml    |  34 ++
 .../baremetal-compute/module.properties         |   2 +
 .../spring-baremetal-compute-context.xml        |  35 ++
 .../baremetal-discoverer/module.properties      |   2 +
 .../spring-baremetal-discoverer-context.xml     |  34 ++
 .../baremetal-network/module.properties         |   2 +
 .../spring-baremetal-network-context.xml        |  46 +++
 .../baremetal-planner/module.properties         |   2 +
 .../spring-baremetal-planner-context.xml        |  34 ++
 .../baremetal-storage/module.properties         |   2 +
 .../spring-baremetal-storage-context.xml        |  32 ++
 .../core/spring-baremetal-core-context.xml      |  42 +++
 .../cloudstack/kvm-compute/module.properties    |   2 +
 .../kvm-compute/spring-kvm-compute-context.xml  |  34 ++
 .../cloudstack/ovm-compute/module.properties    |   2 +
 .../ovm-compute/spring-ovm-compute-context.xml  |  39 +++
 .../cloudstack/ovm-discoverer/module.properties |   2 +
 .../spring-ovm-discoverer-context.xml           |  34 ++
 .../core/spring-simulator-core-context.xml      |  45 +++
 .../simulator-compute/module.properties         |   2 +
 .../spring-simulator-compute-context.xml        |  34 ++
 .../simulator-discoverer/module.properties      |   2 +
 .../spring-simulator-discover-context.xml       |  36 +++
 .../simulator-planner/module.properties         |   2 +
 .../simulator-planner/spring-context.xml        |  34 ++
 .../simulator-storage/module.properties         |   2 +
 .../spring-simulator-storage-context.xml        |  33 ++
 .../agent/manager/MockAgentManagerImpl.java     |  70 ++--
 .../cloudstack/core/spring-ucs-core-context.xml |  35 ++
 .../core/spring-vmware-core-context.xml         |  43 +++
 .../cloudstack/vmware-compute/module.properties |   2 +
 .../spring-vmware-compute-context.xml           |  43 +++
 .../vmware-compute/vmware-defaults.properties   |   1 +
 .../vmware-discoverer/module.properties         |   2 +
 .../spring-vmware-discoverer-context.xml        |  35 ++
 .../cloudstack/vmware-network/module.properties |   2 +
 .../spring-vmware-network-context.xml           |  34 ++
 .../cloudstack/vmware-storage/module.properties |   2 +
 .../spring-vmware-storage-context.xml           |  33 ++
 .../vmware/VmwareServerDiscoverer.java          |  33 +-
 .../xenserver-compute/module.properties         |   2 +
 .../spring-xenserver-compute-context.xml        |  28 ++
 .../xenserver-discoverer/module.properties      |   2 +
 .../spring-xenserver-discoverer-context.xml     |  25 ++
 .../META-INF/cloudstack/vns/module.properties   |   2 +
 .../cloudstack/vns/spring-vns-context.xml       |  36 +++
 .../META-INF/cloudstack/elb/module.properties   |   2 +
 .../cloudstack/elb/spring-elb-context.xml       |  34 ++
 .../core/spring-internallb-core-context.xml     |  37 +++
 .../cloudstack/midonet/module.properties        |   2 +
 .../midonet/spring-midonet-context.xml          |  37 +++
 .../META-INF/cloudstack/nvp/module.properties   |   2 +
 .../cloudstack/nvp/spring-nvp-context.xml       |  40 +++
 .../META-INF/cloudstack/ovs/module.properties   |   2 +
 .../cloudstack/ovs/spring-ovs-context.xml       |  40 +++
 .../META-INF/cloudstack/ssp/module.properties   |   2 +
 .../cloudstack/ssp/spring-ssp-context.xml       |  42 +++
 .../META-INF/cloudstack/vxlan/module.properties |   2 +
 .../cloudstack/vxlan/spring-vxlan-context.xml   |  34 ++
 .../storage-image-default/module.properties     |   2 +
 .../spring-storage-image-default-context.xml    |  33 ++
 .../storage-image-s3/module.properties          |   2 +
 .../spring-storage-image-s3-context.xml         |  34 ++
 .../storage-image-swift/module.properties       |   2 +
 .../spring-storage-image-swift-context.xml      |  33 ++
 .../storage-volume-default/module.properties    |   2 +
 .../spring-storage-volume-default-context.xml   |  35 ++
 .../storage-volume-solidfire/module.properties  |   2 +
 .../spring-storage-volume-solidfire-context.xml |  33 ++
 .../META-INF/cloudstack/ldap/module.properties  |   2 +
 .../cloudstack/ldap/spring-ldap-context.xml     |  39 +++
 .../META-INF/cloudstack/md5/module.properties   |   2 +
 .../cloudstack/md5/spring-md5-context.xml       |  34 ++
 .../cloudstack/plaintext/module.properties      |   2 +
 .../plaintext/spring-plaintext-context.xml      |  35 ++
 .../cloudstack/sha256salted/module.properties   |   2 +
 .../spring-sha256salted-context.xml             |  34 ++
 quickcloud/pom.xml                              |  30 ++
 .../spring-quickcloud-core-context-override.xml |  32 ++
 .../spring-server-core-managers-context.xml     | 214 +++++++++++++
 .../core/spring-server-core-misc-context.xml    |  68 ++++
 .../module.properties                           |   2 +
 ...ing-server-alert-adapter-backend-context.xml |  32 ++
 .../module.properties                           |   2 +
 ...ing-server-alert-adapter-compute-context.xml |  32 ++
 .../module.properties                           |   2 +
 ...ing-server-alert-adapter-storage-context.xml |  32 ++
 .../server-allocator/module.properties          |   2 +
 .../spring-server-allocator-context.xml         |  48 +++
 .../cloudstack/server-api/module.properties     |   2 +
 .../server-api/spring-server-api-context.xml    |  33 ++
 .../cloudstack/server-compute/module.properties |   2 +
 .../spring-server-compute-context.xml           |  38 +++
 .../server-discoverer/module.properties         |   2 +
 .../spring-server-discoverer-context.xml        |  45 +++
 .../cloudstack/server-fencer/module.properties  |   2 +
 .../spring-server-fencer-context.xml            |  37 +++
 .../server-investigator/module.properties       |   2 +
 .../spring-server-investigator-context.xml      |  46 +++
 .../cloudstack/server-network/module.properties |   2 +
 .../spring-server-network-context.xml           |  64 ++++
 .../cloudstack/server-planner/module.properties |   2 +
 .../spring-server-planner-context.xml           |  34 ++
 .../cloudstack/server-storage/module.properties |   2 +
 .../spring-server-storage-context.xml           |  34 ++
 .../server-template-adapter/module.properties   |   2 +
 .../spring-server-template-adapter-context.xml  |  32 ++
 server/src/com/cloud/api/ApiServer.java         |   7 +-
 .../consoleproxy/StaticConsoleProxyManager.java |   3 +
 .../com/cloud/event/ActionEventInterceptor.java |  33 +-
 .../com/cloud/network/vpc/VpcManagerImpl.java   |   7 +-
 .../com/cloud/resource/ResourceManagerImpl.java |   8 +
 .../module.properties                           |   2 +
 ...ing-secondary-storage-discoverer-context.xml |  36 +++
 .../cloud/utils/component/ComponentContext.java |  27 +-
 245 files changed, 8195 insertions(+), 117 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/api/resources/META-INF/cloudstack/api-planner/module.properties
----------------------------------------------------------------------
diff --git a/api/resources/META-INF/cloudstack/api-planner/module.properties b/api/resources/META-INF/cloudstack/api-planner/module.properties
new file mode 100644
index 0000000..98f4ffe
--- /dev/null
+++ b/api/resources/META-INF/cloudstack/api-planner/module.properties
@@ -0,0 +1,2 @@
+name=api-planner
+parent=planner
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/api/resources/META-INF/cloudstack/api-planner/spring-api-planner-context.xml
----------------------------------------------------------------------
diff --git a/api/resources/META-INF/cloudstack/api-planner/spring-api-planner-context.xml b/api/resources/META-INF/cloudstack/api-planner/spring-api-planner-context.xml
new file mode 100644
index 0000000..2fd34a8
--- /dev/null
+++ b/api/resources/META-INF/cloudstack/api-planner/spring-api-planner-context.xml
@@ -0,0 +1,34 @@
+<!--
+  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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+                      http://www.springframework.org/schema/context
+                      http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+                      >
+
+    <bean id="UserDispersingPlanner" class="com.cloud.deploy.UserDispersingPlanner">
+        <property name="name" value="UserDispersingPlanner" />
+    </bean>
+    
+</beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/api/src/org/apache/cloudstack/context/CallContext.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/context/CallContext.java b/api/src/org/apache/cloudstack/context/CallContext.java
index a9867d3..15fbad3 100644
--- a/api/src/org/apache/cloudstack/context/CallContext.java
+++ b/api/src/org/apache/cloudstack/context/CallContext.java
@@ -57,7 +57,7 @@ public class CallContext {
     private User user;
     private final Map<Object, Object> context = new HashMap<Object, Object>();
 
-    private static EntityManager s_entityMgr;
+    static EntityManager s_entityMgr;
 
     public static void init(EntityManager entityMgr) {
         s_entityMgr = entityMgr;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/client/resources/META-INF/cloudstack/webApplicationContext.xml
----------------------------------------------------------------------
diff --git a/client/resources/META-INF/cloudstack/webApplicationContext.xml b/client/resources/META-INF/cloudstack/webApplicationContext.xml
new file mode 100644
index 0000000..fea2709
--- /dev/null
+++ b/client/resources/META-INF/cloudstack/webApplicationContext.xml
@@ -0,0 +1,32 @@
+<!--
+  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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+                      http://www.springframework.org/schema/context
+                      http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+                      >                     
+
+    <!-- There is no reason to put anything here -->
+
+</beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/client/tomcatconf/log4j-cloud.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/log4j-cloud.xml.in b/client/tomcatconf/log4j-cloud.xml.in
index d439b77..08021f2 100755
--- a/client/tomcatconf/log4j-cloud.xml.in
+++ b/client/tomcatconf/log4j-cloud.xml.in
@@ -152,6 +152,14 @@ under the License.
       <priority value="INFO"/>
    </category>
    
+   <category name="org.springframework">
+      <priority value="WARN"/>
+   </category>
+   
+   <category name="org.apache.cloudstack.spring.module.context.ResourceApplicationContext">
+      <priority value="WARN"/>
+   </category>
+   
    <category name="net">
      <priority value="INFO"/>
    </category>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/allocator/module.properties
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/allocator/module.properties b/core/resources/META-INF/cloudstack/allocator/module.properties
new file mode 100644
index 0000000..9ae4d8e
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/allocator/module.properties
@@ -0,0 +1,2 @@
+name=allocator
+parent=core

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/allocator/spring-core-allocator-context.xml
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/allocator/spring-core-allocator-context.xml b/core/resources/META-INF/cloudstack/allocator/spring-core-allocator-context.xml
new file mode 100644
index 0000000..65ebc70
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/allocator/spring-core-allocator-context.xml
@@ -0,0 +1,32 @@
+<!--
+  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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+                      http://www.springframework.org/schema/context
+                      http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+                      >                     
+
+    <bean id="usageEventUtils" class="com.cloud.event.UsageEventUtils" />
+
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/allocator/spring-core-lifecycle-allocator-context-inheritable.xml
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/allocator/spring-core-lifecycle-allocator-context-inheritable.xml b/core/resources/META-INF/cloudstack/allocator/spring-core-lifecycle-allocator-context-inheritable.xml
new file mode 100644
index 0000000..ad00de8
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/allocator/spring-core-lifecycle-allocator-context-inheritable.xml
@@ -0,0 +1,42 @@
+<!--
+  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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+                      http://www.springframework.org/schema/context
+                      http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+                      >                     
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="hostAllocatorsRegistry" />
+        <property name="typeClass"
+            value="com.cloud.agent.manager.allocator.HostAllocator" />
+    </bean>
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="consoleProxyAllocatorsRegistry" />
+        <property name="typeClass"
+            value="com.cloud.consoleproxy.ConsoleProxyAllocator" />
+    </bean>
+
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/api/module.properties
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/api/module.properties b/core/resources/META-INF/cloudstack/api/module.properties
new file mode 100644
index 0000000..0a08e16
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/api/module.properties
@@ -0,0 +1,2 @@
+name=api
+parent=core

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/api/spring-core-lifecycle-api-context-inheritable.xml
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/api/spring-core-lifecycle-api-context-inheritable.xml b/core/resources/META-INF/cloudstack/api/spring-core-lifecycle-api-context-inheritable.xml
new file mode 100644
index 0000000..b0ed228
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/api/spring-core-lifecycle-api-context-inheritable.xml
@@ -0,0 +1,53 @@
+<!--
+  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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+                      http://www.springframework.org/schema/context
+                      http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+                      >
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="userAuthenticatorsRegistry" />
+        <property name="typeClass"
+            value="com.cloud.server.auth.UserAuthenticator" />
+    </bean>
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="securityCheckersRegistry" />
+        <property name="typeClass"
+            value="org.apache.cloudstack.acl.SecurityChecker" />
+    </bean>
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="apiCheckersRegistry" />
+        <property name="typeClass" value="org.apache.cloudstack.acl.APIChecker" />
+    </bean>
+    
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="userPasswordEncodersRegistry" />
+        <property name="typeClass" value="com.cloud.server.auth.UserAuthenticator" />
+    </bean>
+    
+
+</beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/backend/module.properties
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/backend/module.properties b/core/resources/META-INF/cloudstack/backend/module.properties
new file mode 100644
index 0000000..58f0b36
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/backend/module.properties
@@ -0,0 +1,2 @@
+name=backend
+parent=core

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/bootstrap/module.properties
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/bootstrap/module.properties b/core/resources/META-INF/cloudstack/bootstrap/module.properties
new file mode 100644
index 0000000..fa28ca4
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/bootstrap/module.properties
@@ -0,0 +1 @@
+name=bootstrap

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/bootstrap/spring-bootstrap-context-inheritable.xml
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/bootstrap/spring-bootstrap-context-inheritable.xml b/core/resources/META-INF/cloudstack/bootstrap/spring-bootstrap-context-inheritable.xml
new file mode 100644
index 0000000..adee3ed
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/bootstrap/spring-bootstrap-context-inheritable.xml
@@ -0,0 +1,39 @@
+<!--
+  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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+                      http://www.springframework.org/schema/context
+                      http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+                      >
+
+    <context:annotation-config />
+
+    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+        <property name="order" value="100" />
+        <property name="ignoreResourceNotFound" value="true" />
+        <property name="ignoreUnresolvablePlaceholders" value="true" />
+        <property name="locations" ref="DefaultConfigResources" />
+    </bean>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/bootstrap/spring-bootstrap-context.xml
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/bootstrap/spring-bootstrap-context.xml b/core/resources/META-INF/cloudstack/bootstrap/spring-bootstrap-context.xml
new file mode 100644
index 0000000..40fcc71
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/bootstrap/spring-bootstrap-context.xml
@@ -0,0 +1,32 @@
+<!--
+  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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+                      http://www.springframework.org/schema/context
+                      http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+                      >                     
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.CloudStackLog4jSetup" />
+
+</beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/compute/module.properties
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/compute/module.properties b/core/resources/META-INF/cloudstack/compute/module.properties
new file mode 100644
index 0000000..d997f7b
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/compute/module.properties
@@ -0,0 +1,2 @@
+name=compute
+parent=backend

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/compute/spring-core-lifecycle-compute-context-inheritable.xml
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/compute/spring-core-lifecycle-compute-context-inheritable.xml b/core/resources/META-INF/cloudstack/compute/spring-core-lifecycle-compute-context-inheritable.xml
new file mode 100644
index 0000000..b57f52f
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/compute/spring-core-lifecycle-compute-context-inheritable.xml
@@ -0,0 +1,45 @@
+<!--
+  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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+                      http://www.springframework.org/schema/context
+                      http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+                      >
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="haInvestigatorsRegistry" />
+        <property name="typeClass" value="com.cloud.ha.Investigator" />
+    </bean>
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="haFenceBuildersRegistry" />
+        <property name="typeClass" value="com.cloud.ha.FenceBuilder" />
+    </bean>
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="hypervisorGurusRegistry" />
+        <property name="typeClass" value="com.cloud.hypervisor.HypervisorGuru" />
+    </bean>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/core/module.properties
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/core/module.properties b/core/resources/META-INF/cloudstack/core/module.properties
new file mode 100644
index 0000000..b88fe93
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/core/module.properties
@@ -0,0 +1,2 @@
+name=core
+parent=system

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/core/spring-core-context.xml
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/core/spring-core-context.xml b/core/resources/META-INF/cloudstack/core/spring-core-context.xml
new file mode 100644
index 0000000..6cd00a4
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/core/spring-core-context.xml
@@ -0,0 +1,36 @@
+<!--
+  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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+                      http://www.springframework.org/schema/context
+                      http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+                      >
+
+    <bean id="componentContext" class="com.cloud.utils.component.ComponentContext">
+        <property name="initializeBeans" value="false" />
+    </bean>
+
+    <bean id="encryptionSecretKeyChecker" class="com.cloud.utils.crypt.EncryptionSecretKeyChecker" />
+
+</beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/core/spring-core-lifecycle-core-context-inheritable.xml
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/core/spring-core-lifecycle-core-context-inheritable.xml b/core/resources/META-INF/cloudstack/core/spring-core-lifecycle-core-context-inheritable.xml
new file mode 100644
index 0000000..06b9f5e
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/core/spring-core-lifecycle-core-context-inheritable.xml
@@ -0,0 +1,41 @@
+<!--
+  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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+                      http://www.springframework.org/schema/context
+                      http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+                      >
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="registryRegistry" />
+        <property name="typeClass" value="com.cloud.utils.component.Registry" />
+    </bean>
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.PluggableServiceLifecycle">
+        <property name="registry" ref="apiCommandsRegistry" />
+        <property name="typeClass"
+            value="com.cloud.utils.component.PluggableService" />
+    </bean>
+    
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/core/spring-core-registry-core-context.xml
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/core/spring-core-registry-core-context.xml b/core/resources/META-INF/cloudstack/core/spring-core-registry-core-context.xml
new file mode 100644
index 0000000..170d33d
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/core/spring-core-registry-core-context.xml
@@ -0,0 +1,187 @@
+<!--
+  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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+                      http://www.springframework.org/schema/context
+                      http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+                      >
+
+    <bean id="userAuthenticatorsRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="orderConfigKey" value="user.authenticators.order" />
+        <property name="excludeKey" value="user.authenticators.exclude" />
+        <property name="orderConfigDefault" value="SHA256SALT,MD5,LDAP,PLAINTEXT" />
+    </bean>
+
+    <bean id="userPasswordEncodersRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="orderConfigKey" value="user.password.encoders.order" />
+        <property name="excludeKey" value="user.password.encoders.exclude" />
+        <property name="orderConfigDefault" value="SHA256SALT,MD5,LDAP,PLAINTEXT" />
+    </bean>
+
+    <bean id="securityCheckersRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="orderConfigKey" value="security.checkers.order" />
+        <property name="excludeKey" value="security.checkers.exclude" />
+        <property name="orderConfigDefault"
+            value="AffinityGroupAccessChecker,DomainChecker" />
+    </bean>
+
+    <bean id="resourceDiscoverersRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="excludeKey" value="resource.discoverers.exclude" />
+        <property name="excludeDefault" value="dummyHostDiscoverer" />
+    </bean>
+
+    <bean id="haInvestigatorsRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="orderConfigKey" value="ha.investigators.order" />
+        <property name="orderConfigDefault"
+            value="SimpleInvestigator,XenServerInvestigator,PingInvestigator,ManagementIPSysVMInvestigator,KVMInvestigator" />
+        <property name="excludeKey" value="ha.investigators.exclude" />
+    </bean>
+
+    <bean id="haFenceBuildersRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="excludeKey" value="ha.fence.builders.exclude" />
+        <property name="excludeDefault" value="RecreatableFencer" />
+    </bean>
+
+    <bean id="deploymentPlannersRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="orderConfigKey" value="deployment.planners.order" />
+        <property name="orderConfigDefault"
+            value="FirstFitPlanner,UserDispersingPlanner,UserConcentratedPodPlanner,ImplicitDedicationPlanner,BareMetalPlanner" />
+        <property name="excludeKey" value="deployment.planners.exclude" />
+    </bean>
+
+    <bean id="podAllocatorsRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="excludeKey" value="pod.allocators.exclude" />
+    </bean>
+
+    <bean id="hostAllocatorsRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="excludeKey" value="host.allocators.exclude" />
+        <property name="excludeDefault"
+            value="RandomAllocator,TestingAllocator,FirstFitAllocator,RecreateHostAllocator" />
+    </bean>
+
+    <bean id="storagePoolAllocatorsRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="orderConfigKey" value="storage.pool.allocators.order" />
+        <property name="orderConfigDefault"
+            value="LocalStorage,ClusterScopeStoragePoolAllocator,ZoneWideStoragePoolAllocator" />
+        <property name="excludeKey" value="storage.pool.allocators.exclude" />
+        <property name="excludeDefault" value="GCStorage" />
+    </bean>
+
+    <bean id="secondaryStorageVmAllocatorsRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="excludeKey"
+            value="secondary.storage.vm.allocators.exclude" />
+    </bean>
+
+    <bean id="consoleProxyAllocatorsRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="excludeKey" value="console.proxy.allocator.exclude" />
+    </bean>
+
+    <bean id="templateAdapterRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="excludeKey" value="template.adapter.exclude" />
+    </bean>
+
+    <bean id="ipDeployersRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="excludeKey" value="ip.deployers.exclude" />
+        <property name="excludeDefault" value="MidoNetElement" />
+    </bean>
+
+    <bean id="dhcpProvidersRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="excludeKey" value="dhcp.providers.exclude" />
+        <property name="excludeDefault" value="MidoNetElement" />
+    </bean>
+
+    <bean id="networkGurusRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="excludeKey" value="network.gurus.exclude" />
+    </bean>
+
+    <bean id="networkElementsRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="excludeKey" value="network.elements.registry.exclude" />
+        <property name="excludeDefault" value="ElasticLoadBalancerElement" />
+        <property name="preRegistered">
+            <list>
+                <ref bean="VpcVirtualRouter" />
+                <ref bean="InternalLbVm" />
+            </list>
+        </property>
+    </bean>
+
+    <bean id="affinityProcessorsRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="orderConfigKey" value="affinity.processors.order" />
+        <property name="orderConfigDefault"
+            value="HostAntiAffinityProcessor,ExplicitDedicationProcessor" />
+        <property name="excludeKey" value="affinity.processors.exclude" />
+    </bean>
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.DumpRegistry" >
+        <property name="registries" value="#{registryRegistry.registered}" />
+    </bean>
+    
+    <bean id="registryRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+    </bean>
+
+    <bean id="apiCheckersRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="excludeKey" value="api.checkers.exclude" />
+    </bean>
+
+    <bean id="apiCommandsRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="excludeKey" value="api.commands.exclude" />
+    </bean>
+
+    <bean id="hypervisorGurusRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="excludeKey" value="hypervisor.gurus.exclude" />
+    </bean>
+    
+    <bean id="vpcProvidersRegistry"
+        class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
+        <property name="excludeKey" value="vpc.providers.exclude" />
+        <property name="preRegistered">
+            <list>
+                <ref bean="VpcVirtualRouter" />
+            </list>
+        </property>
+    </bean>
+
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/discoverer/module.properties
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/discoverer/module.properties b/core/resources/META-INF/cloudstack/discoverer/module.properties
new file mode 100644
index 0000000..9fba24c
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/discoverer/module.properties
@@ -0,0 +1,2 @@
+name=discoverer
+parent=core

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/discoverer/spring-core-lifecycle-discoverer-context-inheritable.xml
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/discoverer/spring-core-lifecycle-discoverer-context-inheritable.xml b/core/resources/META-INF/cloudstack/discoverer/spring-core-lifecycle-discoverer-context-inheritable.xml
new file mode 100644
index 0000000..2c83a10
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/discoverer/spring-core-lifecycle-discoverer-context-inheritable.xml
@@ -0,0 +1,35 @@
+<!--
+  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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+                      http://www.springframework.org/schema/context
+                      http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+                      >
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="resourceDiscoverersRegistry" />
+        <property name="typeClass" value="com.cloud.resource.Discoverer" />
+    </bean>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/network/module.properties
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/network/module.properties b/core/resources/META-INF/cloudstack/network/module.properties
new file mode 100644
index 0000000..6e5219a
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/network/module.properties
@@ -0,0 +1,2 @@
+name=network
+parent=backend

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/network/spring-core-lifecycle-network-context-inheritable.xml
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/network/spring-core-lifecycle-network-context-inheritable.xml b/core/resources/META-INF/cloudstack/network/spring-core-lifecycle-network-context-inheritable.xml
new file mode 100644
index 0000000..b2660fc
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/network/spring-core-lifecycle-network-context-inheritable.xml
@@ -0,0 +1,58 @@
+<!--
+  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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+                      http://www.springframework.org/schema/context
+                      http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+                      >
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="ipDeployersRegistry" />
+        <property name="typeClass" value="com.cloud.network.element.IpDeployer" />
+    </bean>
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="dhcpProvidersRegistry" />
+        <property name="typeClass"
+            value="com.cloud.network.element.DhcpServiceProvider" />
+    </bean>
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="networkGurusRegistry" />
+        <property name="typeClass" value="com.cloud.network.guru.NetworkGuru" />
+    </bean>
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="networkElementsRegistry" />
+        <property name="typeClass"
+            value="com.cloud.network.element.NetworkElement" />
+    </bean>
+    
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="vpcProvidersRegistry" />
+        <property name="typeClass"
+            value="com.cloud.network.element.VpcProvider" />
+    </bean>
+
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/planner/module.properties
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/planner/module.properties b/core/resources/META-INF/cloudstack/planner/module.properties
new file mode 100644
index 0000000..eea9158
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/planner/module.properties
@@ -0,0 +1,2 @@
+name=planner
+parent=allocator
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/planner/spring-core-lifecycle-planner-context-inheritable.xml
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/planner/spring-core-lifecycle-planner-context-inheritable.xml b/core/resources/META-INF/cloudstack/planner/spring-core-lifecycle-planner-context-inheritable.xml
new file mode 100644
index 0000000..715f86d
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/planner/spring-core-lifecycle-planner-context-inheritable.xml
@@ -0,0 +1,41 @@
+<!--
+  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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+                      http://www.springframework.org/schema/context
+                      http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+                      >
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="deploymentPlannersRegistry" />
+        <property name="typeClass" value="com.cloud.deploy.DeploymentPlanner" />
+    </bean>
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="affinityProcessorsRegistry" />
+        <property name="typeClass"
+            value="org.apache.cloudstack.affinity.AffinityGroupProcessor" />
+    </bean>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/storage/module.properties
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/storage/module.properties b/core/resources/META-INF/cloudstack/storage/module.properties
new file mode 100644
index 0000000..fe32b10
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/storage/module.properties
@@ -0,0 +1,2 @@
+name=storage
+parent=backend

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/storage/spring-lifecycle-storage-context-inheritable.xml
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/storage/spring-lifecycle-storage-context-inheritable.xml b/core/resources/META-INF/cloudstack/storage/spring-lifecycle-storage-context-inheritable.xml
new file mode 100644
index 0000000..617dd21
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/storage/spring-lifecycle-storage-context-inheritable.xml
@@ -0,0 +1,60 @@
+<!--
+  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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+                      http://www.springframework.org/schema/context
+                      http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+                      >
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registryBeanName" value="dataStoreProviderManager" />
+        <property name="typeClass"
+            value="org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider" />
+    </bean>
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="storagePoolAllocatorsRegistry" />
+        <property name="typeClass"
+            value="org.apache.cloudstack.engine.subsystem.api.storage.StoragePoolAllocator" />
+    </bean>
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="secondaryStorageVmAllocatorsRegistry" />
+        <property name="typeClass"
+            value="com.cloud.storage.secondary.SecondaryStorageVmAllocator" />
+    </bean>
+
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="templateAdapterRegistry" />
+        <property name="typeClass" value="com.cloud.template.TemplateAdapter" />
+    </bean>
+    
+    <bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
+        <property name="registry" ref="podAllocatorsRegistry" />
+        <property name="typeClass"
+            value="com.cloud.agent.manager.allocator.PodAllocator" />
+    </bean>
+
+    
+</beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/system/module.properties
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/system/module.properties b/core/resources/META-INF/cloudstack/system/module.properties
new file mode 100644
index 0000000..b86468e
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/system/module.properties
@@ -0,0 +1,2 @@
+name=system
+parent=bootstrap

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/system/spring-core-system-context-inheritable.xml
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/system/spring-core-system-context-inheritable.xml b/core/resources/META-INF/cloudstack/system/spring-core-system-context-inheritable.xml
new file mode 100644
index 0000000..80c5da7
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/system/spring-core-system-context-inheritable.xml
@@ -0,0 +1,54 @@
+<!--
+  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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+                      http://www.springframework.org/schema/context
+                      http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+                      >                     
+
+  <!--
+    LifeCycle
+  -->
+  <bean id="cloudStackLifeCycle" class="org.apache.cloudstack.spring.lifecycle.CloudStackExtendedLifeCycle" />
+  <bean id="moduleStartup" class="org.apache.cloudstack.spring.lifecycle.CloudStackExtendedLifeCycleStart" >
+    <property name="lifeCycle" ref="cloudStackLifeCycle" />
+  </bean>
+
+  <!--
+    AOP
+  -->
+  <bean id="transactionContextInterceptor" class="com.cloud.utils.db.TransactionContextInterceptor" />
+  <bean id="actionEventInterceptor" class="com.cloud.event.ActionEventInterceptor" />
+  <aop:config>
+    <aop:advisor advice-ref="transactionContextInterceptor" 
+        pointcut="target(com.cloud.utils.db.GenericDaoBase)" />
+    <aop:advisor advice-ref="transactionContextInterceptor" 
+        pointcut="execution(* com.cloud.utils.db.EntityManager.*(..))" />
+    <aop:advisor advice-ref="actionEventInterceptor" 
+        pointcut="execution(* *(..)) &amp;&amp; @annotation(com.cloud.event.ActionEvent)" />
+    <aop:advisor advice-ref="actionEventInterceptor" 
+        pointcut="execution(* *(..)) &amp;&amp; @annotation(com.cloud.event.ActionEvents)" />
+  </aop:config>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/core/resources/META-INF/cloudstack/system/spring-core-system-context.xml
----------------------------------------------------------------------
diff --git a/core/resources/META-INF/cloudstack/system/spring-core-system-context.xml b/core/resources/META-INF/cloudstack/system/spring-core-system-context.xml
new file mode 100644
index 0000000..c2d540c
--- /dev/null
+++ b/core/resources/META-INF/cloudstack/system/spring-core-system-context.xml
@@ -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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+                      http://www.springframework.org/schema/context
+                      http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+                      >
+
+  <!--
+    Managed Context
+  -->
+  <bean id="ManagedContext" class="org.apache.cloudstack.managed.context.impl.DefaultManagedContext" >
+    <property name="listeners">
+        <list>
+            <!-- Put CallContext listener first because it will open and then close a DB connection.
+                If you put it after the TransactionContextListener, the thread will hold open a DB 
+                connection for the life of the thread -->
+            <bean class="org.apache.cloudstack.context.CallContextListener" />
+            <bean class="com.cloud.utils.db.TransactionContextListener" />
+        </list>
+    </property>
+  </bean>
+  
+  <bean class="org.apache.cloudstack.managed.context.ManagedContextRunnable" factory-method="initializeGlobalContext" 
+    autowire-candidate="false" >
+    <constructor-arg><ref bean="ManagedContext"/></constructor-arg>
+  </bean>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/engine/api/resources/META-INF/cloudstack/core/spring-engine-api-core-context.xml
----------------------------------------------------------------------
diff --git a/engine/api/resources/META-INF/cloudstack/core/spring-engine-api-core-context.xml b/engine/api/resources/META-INF/cloudstack/core/spring-engine-api-core-context.xml
new file mode 100644
index 0000000..1cb8829
--- /dev/null
+++ b/engine/api/resources/META-INF/cloudstack/core/spring-engine-api-core-context.xml
@@ -0,0 +1,44 @@
+<!--
+  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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+                      http://www.springframework.org/schema/context
+                      http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+                      >
+
+    <bean id="clusterRestService"
+        class="org.apache.cloudstack.engine.rest.service.api.ClusterRestService" />
+    <bean id="dataDisk"
+        class="org.apache.cloudstack.engine.subsystem.api.storage.type.DataDisk" />
+    <bean id="podRestService" class="org.apache.cloudstack.engine.rest.service.api.PodRestService" />
+    <bean id="iso" class="org.apache.cloudstack.engine.subsystem.api.storage.type.Iso" />
+    <bean id="networkRestService" class="org.apache.cloudstack.engine.rest.service.api.NetworkRestService" />
+    <bean id="provisioningServiceImpl" class="org.apache.cloudstack.engine.service.api.ProvisioningServiceImpl" />
+    <bean id="rootDisk" class="org.apache.cloudstack.engine.subsystem.api.storage.type.RootDisk" />
+    <bean id="virtualMachineRestService" class="org.apache.cloudstack.engine.rest.service.api.VirtualMachineRestService" />
+    <bean id="volumeRestService" class="org.apache.cloudstack.engine.rest.service.api.VolumeRestService" />
+    <bean id="volumeTypeHelper" class="org.apache.cloudstack.engine.subsystem.api.storage.type.VolumeTypeHelper" />
+    <bean id="zoneRestService" class="org.apache.cloudstack.engine.rest.service.api.ZoneRestService" />
+    
+</beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/engine/components-api/resources/META-INF/cloudstack/core/spring-engine-components-api-core-context.xml
----------------------------------------------------------------------
diff --git a/engine/components-api/resources/META-INF/cloudstack/core/spring-engine-components-api-core-context.xml b/engine/components-api/resources/META-INF/cloudstack/core/spring-engine-components-api-core-context.xml
new file mode 100644
index 0000000..fd7f967
--- /dev/null
+++ b/engine/components-api/resources/META-INF/cloudstack/core/spring-engine-components-api-core-context.xml
@@ -0,0 +1,30 @@
+<!--
+  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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+                      http://www.springframework.org/schema/context
+                      http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+                      >                     
+
+</beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67186429/engine/orchestration/resources/META-INF/cloudstack/core/spring-engine-orchestration-core-context.xml
----------------------------------------------------------------------
diff --git a/engine/orchestration/resources/META-INF/cloudstack/core/spring-engine-orchestration-core-context.xml b/engine/orchestration/resources/META-INF/cloudstack/core/spring-engine-orchestration-core-context.xml
new file mode 100644
index 0000000..b5c4254
--- /dev/null
+++ b/engine/orchestration/resources/META-INF/cloudstack/core/spring-engine-orchestration-core-context.xml
@@ -0,0 +1,71 @@
+<!--
+  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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+                      http://www.springframework.org/schema/context
+                      http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+                      >
+
+    <bean id="clusterBasedAgentLoadBalancerPlanner"
+        class="com.cloud.cluster.agentlb.ClusterBasedAgentLoadBalancerPlanner">
+        <property name="name" value="ClusterBasedAgentLoadBalancerPlanner" />
+    </bean>
+
+    <bean id="volumeOrchestrator"
+        class="org.apache.cloudstack.engine.orchestration.VolumeOrchestrator">
+        <property name="podAllocators" value="#{podAllocatorsRegistry.registered}" />
+        <property name="storagePoolAllocators"
+            value="#{storagePoolAllocatorsRegistry.registered}" />
+    </bean>
+
+    <bean id="clusteredVirtualMachineManagerImpl" class="com.cloud.vm.ClusteredVirtualMachineManagerImpl">
+        <property name="hostAllocators" value="#{hostAllocatorsRegistry.registered}" />
+        <property name="storagePoolAllocators"
+            value="#{storagePoolAllocatorsRegistry.registered}" />
+    </bean>
+
+    <bean id="networkOrchestrator"
+        class="org.apache.cloudstack.engine.orchestration.NetworkOrchestrator">
+        <property name="networkGurus" value="#{networkGurusRegistry.registered}" />
+        <property name="networkElements" value="#{networkElementsRegistry.registered}" />
+        <property name="ipDeployers" value="#{ipDeployersRegistry.registered}" />
+        <property name="dhcpProviders" value="#{dhcpProvidersRegistry.registered}" />
+    </bean>
+
+    <bean id="clusteredAgentManagerImpl" class="com.cloud.agent.manager.ClusteredAgentManagerImpl" />
+
+
+    <bean id="cloudOrchestrator"
+        class="org.apache.cloudstack.engine.orchestration.CloudOrchestrator" />
+    <bean id="dataCenterResourceManagerImpl"
+        class="org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceManagerImpl" />
+    
+    <bean id="vMEntityManagerImpl" class="org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl" >
+        <property name="planners" value="#{deploymentPlannersRegistry.registered}" />
+    </bean>
+    
+    <bean id="virtualMachineEntityImpl" class="org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntityImpl" />
+    
+    
+</beans>