cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kelv...@apache.org
Subject [2/2] git commit: Fix problems after merge
Date Thu, 10 Jan 2013 01:39:07 GMT
Updated Branches:
  refs/heads/javelin ad2cd775e -> 0bcebd33b


Fix problems after merge


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

Branch: refs/heads/javelin
Commit: 0bcebd33b6032d392f46568203f3c2104723dda9
Parents: cf5d935
Author: Kelven Yang <kelveny@gmail.com>
Authored: Wed Jan 9 17:36:53 2013 -0800
Committer: Kelven Yang <kelveny@gmail.com>
Committed: Wed Jan 9 17:36:53 2013 -0800

----------------------------------------------------------------------
 api/src/org/apache/cloudstack/api/BaseCmd.java     |   14 --------------
 client/tomcatconf/applicationContext.xml.in        |   11 -----------
 .../network/dao/NiciraNvpRouterMappingDaoImpl.java |    3 +++
 .../network/guru/NiciraNvpGuestNetworkGuru.java    |    2 ++
 server/src/com/cloud/acl/DomainChecker.java        |    1 +
 .../com/cloud/agent/manager/AgentManagerImpl.java  |    1 +
 .../agent/manager/ClusteredAgentManagerImpl.java   |    2 ++
 .../cloud/api/query/dao/AccountJoinDaoImpl.java    |    4 +++-
 .../cloud/api/query/dao/AsyncJobJoinDaoImpl.java   |    4 +++-
 .../api/query/dao/DomainRouterJoinDaoImpl.java     |    4 +++-
 .../com/cloud/api/query/dao/HostJoinDaoImpl.java   |    4 +++-
 .../api/query/dao/InstanceGroupJoinDaoImpl.java    |    2 ++
 .../api/query/dao/ProjectAccountJoinDaoImpl.java   |    2 ++
 .../query/dao/ProjectInvitationJoinDaoImpl.java    |    2 ++
 .../cloud/api/query/dao/ProjectJoinDaoImpl.java    |    3 +++
 .../api/query/dao/ResourceTagJoinDaoImpl.java      |    4 +++-
 .../api/query/dao/SecurityGroupJoinDaoImpl.java    |    3 +++
 .../api/query/dao/StoragePoolJoinDaoImpl.java      |    2 ++
 .../api/query/dao/UserAccountJoinDaoImpl.java      |    2 ++
 .../com/cloud/api/query/dao/UserVmJoinDaoImpl.java |    4 +++-
 .../com/cloud/api/query/dao/VolumeJoinDaoImpl.java |    2 ++
 .../src/com/cloud/async/SyncQueueManagerImpl.java  |    2 +-
 .../cloud/ha/HighAvailabilityManagerExtImpl.java   |    5 +++++
 .../com/cloud/ha/HighAvailabilityManagerImpl.java  |    2 ++
 .../src/com/cloud/network/NetworkManagerImpl.java  |   15 +++------------
 .../com/cloud/network/as/AutoScaleManagerImpl.java |    3 +++
 .../as/dao/AutoScalePolicyConditionMapDaoImpl.java |    5 ++++-
 .../network/as/dao/AutoScalePolicyDaoImpl.java     |    5 ++++-
 .../network/as/dao/AutoScaleVmGroupDaoImpl.java    |    5 ++++-
 .../as/dao/AutoScaleVmGroupPolicyMapDaoImpl.java   |    5 ++++-
 .../network/as/dao/AutoScaleVmProfileDaoImpl.java  |    5 ++++-
 .../com/cloud/network/as/dao/ConditionDaoImpl.java |    3 +++
 .../com/cloud/network/as/dao/CounterDaoImpl.java   |    3 +++
 .../src/com/cloud/network/dao/NetworkDaoImpl.java  |   13 +++++++------
 .../PremiumSecondaryStorageManagerImpl.java        |    2 ++
 .../com/cloud/server/ManagementServerExtImpl.java  |    3 +++
 .../src/com/cloud/server/ManagementServerImpl.java |    4 ++--
 server/src/com/cloud/storage/dao/S3DaoImpl.java    |    3 +++
 .../com/cloud/storage/dao/VMTemplateS3DaoImpl.java |    4 ++++
 server/src/com/cloud/storage/s3/S3ManagerImpl.java |    3 +++
 .../secondary/SecondaryStorageManagerImpl.java     |   12 ++++++++----
 .../vm/ClusteredVirtualMachineManagerImpl.java     |    5 +++++
 server/src/com/cloud/vm/UserVmManagerImpl.java     |    2 ++
 .../com/cloud/vm/VirtualMachineManagerImpl.java    |    1 +
 44 files changed, 125 insertions(+), 61 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/api/src/org/apache/cloudstack/api/BaseCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/BaseCmd.java b/api/src/org/apache/cloudstack/api/BaseCmd.java
index 22918ab..fbbee50 100644
--- a/api/src/org/apache/cloudstack/api/BaseCmd.java
+++ b/api/src/org/apache/cloudstack/api/BaseCmd.java
@@ -165,7 +165,6 @@ public abstract class BaseCmd {
         _autoScaleService = locator.getManager(AutoScaleService.class);
         _ravService = locator.getManager(RemoteAccessVpnService.class);
         _responseGenerator = generator;
-<<<<<<< HEAD
         _bareMetalVmService = locator.getManager(BareMetalVmService.class);
         _projectService = locator.getManager(ProjectService.class);
         _firewallService = locator.getManager(FirewallService.class);
@@ -178,19 +177,6 @@ public abstract class BaseCmd {
         _networkACLService = locator.getManager(NetworkACLService.class);
         _s2sVpnService = locator.getManager(Site2SiteVpnService.class);
         _queryService = locator.getManager(QueryService.class);
-=======
-        //_bareMetalVmService = ComponentContext.getCompanent(BareMetalVmService.class);
-        _projectService = ComponentContext.getCompanent(ProjectService.class);
-        _firewallService = ComponentContext.getCompanent(FirewallService.class);
-        _domainService = ComponentContext.getCompanent(DomainService.class);
-        _resourceLimitService = ComponentContext.getCompanent(ResourceLimitService.class);
-        _identityService = ComponentContext.getCompanent(IdentityService.class);
-        _storageNetworkService = ComponentContext.getCompanent(StorageNetworkService.class);
-        _taggedResourceService = ComponentContext.getCompanent(TaggedResourceService.class);
-        _vpcService = ComponentContext.getCompanent(VpcService.class);
-        _networkACLService = ComponentContext.getCompanent(NetworkACLService.class);
-        _s2sVpnService = ComponentContext.getCompanent(Site2SiteVpnService.class);
->>>>>>> Seperate configurable components out and let them be loaded from Spring configuration file
     }
 
     public abstract void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/client/tomcatconf/applicationContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/applicationContext.xml.in b/client/tomcatconf/applicationContext.xml.in
index ea67164..aabf963 100644
--- a/client/tomcatconf/applicationContext.xml.in
+++ b/client/tomcatconf/applicationContext.xml.in
@@ -13,7 +13,6 @@
                       http://www.springframework.org/schema/context/spring-context-3.0.xsd">                     
 
   <context:annotation-config />
-
   <context:component-scan base-package="org.apache.cloudstack, com.cloud" />
 
   <!--
@@ -58,14 +57,4 @@
 
   <bean id="eventBus" class = "org.apache.cloudstack.framework.eventbus.EventBusBase" />
 
-  <!--
-    Configurable components
-  -->
-  <bean id="ManagementServerExtImpl" class ="com.cloud.server.ManagementServerExtImpl" />
-  <bean id="userVmManager" class ="com.cloud.vm.UserVmManagerImpl" />
-  <bean id="ClusteredAgentManagerImpl" class ="com.cloud.agent.manager.ClusteredAgentManagerImpl" />
-  <bean id="ClusteredVirtualMachineManagerImpl" class ="com.cloud.vm.ClusteredVirtualMachineManagerImpl" />
-  <bean id="NetworkManagerImpl" class ="com.cloud.network.NetworkManagerImpl" />
-  <bean id="SecondaryStorageManagerImpl" class ="com.cloud.storage.secondary.SecondaryStorageManagerImpl" />
-  <bean id="HighAvailabilityManagerExtImpl" class ="com.cloud.ha.HighAvailabilityManagerExtImpl" />
 </beans>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/plugins/network-elements/nicira-nvp/src/com/cloud/network/dao/NiciraNvpRouterMappingDaoImpl.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/dao/NiciraNvpRouterMappingDaoImpl.java b/plugins/network-elements/nicira-nvp/src/com/cloud/network/dao/NiciraNvpRouterMappingDaoImpl.java
index 091207c..d3192ec 100644
--- a/plugins/network-elements/nicira-nvp/src/com/cloud/network/dao/NiciraNvpRouterMappingDaoImpl.java
+++ b/plugins/network-elements/nicira-nvp/src/com/cloud/network/dao/NiciraNvpRouterMappingDaoImpl.java
@@ -18,12 +18,15 @@ package com.cloud.network.dao;
 
 import javax.ejb.Local;
 
+import org.springframework.stereotype.Component;
+
 import com.cloud.network.NiciraNvpRouterMappingVO;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.SearchCriteria.Op;
 
+@Component
 @Local(value=NiciraNvpRouterMappingDao.class)
 public class NiciraNvpRouterMappingDaoImpl extends GenericDaoBase<NiciraNvpRouterMappingVO, Long> implements NiciraNvpRouterMappingDao {
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java b/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
index 4c1bee1..fa0667b 100644
--- a/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
+++ b/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
@@ -24,6 +24,7 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 
 import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
 
 import com.cloud.agent.AgentManager;
 import com.cloud.agent.api.CreateLogicalSwitchAnswer;
@@ -66,6 +67,7 @@ import com.cloud.vm.ReservationContext;
 import com.cloud.vm.VirtualMachine;
 import com.cloud.vm.VirtualMachineProfile;
 
+@Component
 @Local(value=NetworkGuru.class)
 public class NiciraNvpGuestNetworkGuru extends GuestNetworkGuru {
     private static final Logger s_logger = Logger.getLogger(NiciraNvpGuestNetworkGuru.class);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/acl/DomainChecker.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/acl/DomainChecker.java b/server/src/com/cloud/acl/DomainChecker.java
index 40564fe..6166c11 100755
--- a/server/src/com/cloud/acl/DomainChecker.java
+++ b/server/src/com/cloud/acl/DomainChecker.java
@@ -42,6 +42,7 @@ import com.cloud.user.User;
 import com.cloud.user.dao.AccountDao;
 import com.cloud.utils.component.AdapterBase;
 
+@Component
 @Local(value = SecurityChecker.class)
 public class DomainChecker extends AdapterBase implements SecurityChecker {
     

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/agent/manager/AgentManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/agent/manager/AgentManagerImpl.java b/server/src/com/cloud/agent/manager/AgentManagerImpl.java
index 8b45895..ee5971f 100755
--- a/server/src/com/cloud/agent/manager/AgentManagerImpl.java
+++ b/server/src/com/cloud/agent/manager/AgentManagerImpl.java
@@ -139,6 +139,7 @@ import edu.emory.mathcs.backport.java.util.Collections;
  *         ping.interval before announcing an agent has timed out | float | 2.0x || || router.stats.interval | interval to
  *         report router statistics | seconds | 300s || * }
  **/
+@Component
 @Local(value = { AgentManager.class })
 public class AgentManagerImpl implements AgentManager, HandlerFactory, Manager {
     private static final Logger s_logger = Logger.getLogger(AgentManagerImpl.class);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java b/server/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
index 35aa884..6753b28 100755
--- a/server/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
+++ b/server/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
@@ -91,6 +91,8 @@ import com.cloud.utils.exception.CloudRuntimeException;
 import com.cloud.utils.nio.Link;
 import com.cloud.utils.nio.Task;
 
+@Component
+@Primary
 @Local(value = { AgentManager.class, ClusteredAgentRebalanceService.class })
 public class ClusteredAgentManagerImpl extends AgentManagerImpl implements ClusterManagerListener, ClusteredAgentRebalanceService {
     final static Logger s_logger = Logger.getLogger(ClusteredAgentManagerImpl.class);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java
index 6268724..22b807c 100644
--- a/server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java
@@ -29,12 +29,14 @@ import com.cloud.api.query.vo.UserAccountJoinVO;
 import com.cloud.configuration.Resource.ResourceType;
 import org.apache.cloudstack.api.response.AccountResponse;
 import org.apache.cloudstack.api.response.UserResponse;
+import org.springframework.stereotype.Component;
+
 import com.cloud.user.Account;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 
-
+@Component
 @Local(value={AccountJoinDao.class})
 public class AccountJoinDaoImpl extends GenericDaoBase<AccountJoinVO, Long> implements AccountJoinDao {
     public static final Logger s_logger = Logger.getLogger(AccountJoinDaoImpl.class);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/api/query/dao/AsyncJobJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/AsyncJobJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/AsyncJobJoinDaoImpl.java
index bf1d15c..fb5695b 100644
--- a/server/src/com/cloud/api/query/dao/AsyncJobJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/AsyncJobJoinDaoImpl.java
@@ -29,11 +29,13 @@ import com.cloud.api.query.vo.AsyncJobJoinVO;
 import com.cloud.async.AsyncJob;
 import org.apache.cloudstack.api.ResponseObject;
 import org.apache.cloudstack.api.response.AsyncJobResponse;
+import org.springframework.stereotype.Component;
+
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 
-
+@Component
 @Local(value={AsyncJobJoinDao.class})
 public class AsyncJobJoinDaoImpl extends GenericDaoBase<AsyncJobJoinVO, Long> implements AsyncJobJoinDao {
     public static final Logger s_logger = Logger.getLogger(AsyncJobJoinDaoImpl.class);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java
index 94736cd..cdfac3a 100644
--- a/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java
@@ -29,6 +29,8 @@ import com.cloud.configuration.dao.ConfigurationDao;
 
 import org.apache.cloudstack.api.response.DomainRouterResponse;
 import org.apache.cloudstack.api.response.NicResponse;
+import org.springframework.stereotype.Component;
+
 import com.cloud.network.Networks.TrafficType;
 import com.cloud.network.router.VirtualRouter;
 import com.cloud.user.Account;
@@ -37,7 +39,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 
-
+@Component
 @Local(value={DomainRouterJoinDao.class})
 public class DomainRouterJoinDaoImpl extends GenericDaoBase<DomainRouterJoinVO, Long> implements DomainRouterJoinDao {
     public static final Logger s_logger = Logger.getLogger(DomainRouterJoinDaoImpl.class);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java
index e842383..9a7ba46 100644
--- a/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java
@@ -36,13 +36,15 @@ import com.cloud.host.HostStats;
 
 import org.apache.cloudstack.api.ApiConstants.HostDetails;
 import org.apache.cloudstack.api.response.HostResponse;
+import org.springframework.stereotype.Component;
+
 import com.cloud.storage.StorageStats;
 import com.cloud.utils.component.Inject;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 
-
+@Component
 @Local(value={HostJoinDao.class})
 public class HostJoinDaoImpl extends GenericDaoBase<HostJoinVO, Long> implements HostJoinDao {
     public static final Logger s_logger = Logger.getLogger(HostJoinDaoImpl.class);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/api/query/dao/InstanceGroupJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/InstanceGroupJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/InstanceGroupJoinDaoImpl.java
index f83ef6c..b840459 100644
--- a/server/src/com/cloud/api/query/dao/InstanceGroupJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/InstanceGroupJoinDaoImpl.java
@@ -26,6 +26,7 @@ import com.cloud.api.ApiResponseHelper;
 import com.cloud.api.query.vo.InstanceGroupJoinVO;
 
 import org.apache.cloudstack.api.response.InstanceGroupResponse;
+import org.springframework.stereotype.Component;
 
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
@@ -33,6 +34,7 @@ import com.cloud.utils.db.SearchCriteria;
 import com.cloud.vm.InstanceGroup;
 
 
+@Component
 @Local(value={InstanceGroupJoinDao.class})
 public class InstanceGroupJoinDaoImpl extends GenericDaoBase<InstanceGroupJoinVO, Long> implements InstanceGroupJoinDao {
     public static final Logger s_logger = Logger.getLogger(InstanceGroupJoinDaoImpl.class);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/api/query/dao/ProjectAccountJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/ProjectAccountJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/ProjectAccountJoinDaoImpl.java
index f808da0..1fb9223 100644
--- a/server/src/com/cloud/api/query/dao/ProjectAccountJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/ProjectAccountJoinDaoImpl.java
@@ -23,6 +23,7 @@ import javax.ejb.Local;
 import org.apache.log4j.Logger;
 
 import org.apache.cloudstack.api.response.ProjectAccountResponse;
+import org.springframework.stereotype.Component;
 
 import com.cloud.api.query.vo.ProjectAccountJoinVO;
 import com.cloud.projects.ProjectAccount;
@@ -30,6 +31,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 
+@Component
 @Local(value={ProjectAccountJoinDao.class})
 public class ProjectAccountJoinDaoImpl extends GenericDaoBase<ProjectAccountJoinVO, Long> implements ProjectAccountJoinDao {
     public static final Logger s_logger = Logger.getLogger(ProjectAccountJoinDaoImpl.class);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/api/query/dao/ProjectInvitationJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/ProjectInvitationJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/ProjectInvitationJoinDaoImpl.java
index ebf64d1..ca0f171 100644
--- a/server/src/com/cloud/api/query/dao/ProjectInvitationJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/ProjectInvitationJoinDaoImpl.java
@@ -23,6 +23,7 @@ import javax.ejb.Local;
 import org.apache.log4j.Logger;
 
 import org.apache.cloudstack.api.response.ProjectInvitationResponse;
+import org.springframework.stereotype.Component;
 
 import com.cloud.api.query.vo.ProjectInvitationJoinVO;
 import com.cloud.projects.ProjectInvitation;
@@ -30,6 +31,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 
+@Component
 @Local(value={ProjectInvitationJoinDao.class})
 public class ProjectInvitationJoinDaoImpl extends GenericDaoBase<ProjectInvitationJoinVO, Long> implements ProjectInvitationJoinDao {
     public static final Logger s_logger = Logger.getLogger(ProjectInvitationJoinDaoImpl.class);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/api/query/dao/ProjectJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/ProjectJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/ProjectJoinDaoImpl.java
index 15bff36..77f9303 100644
--- a/server/src/com/cloud/api/query/dao/ProjectJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/ProjectJoinDaoImpl.java
@@ -29,12 +29,15 @@ import com.cloud.api.query.vo.ResourceTagJoinVO;
 import com.cloud.configuration.dao.ConfigurationDao;
 
 import org.apache.cloudstack.api.response.ProjectResponse;
+import org.springframework.stereotype.Component;
+
 import com.cloud.projects.Project;
 import com.cloud.utils.component.Inject;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 
+@Component
 @Local(value={ProjectJoinDao.class})
 public class ProjectJoinDaoImpl extends GenericDaoBase<ProjectJoinVO, Long> implements ProjectJoinDao {
     public static final Logger s_logger = Logger.getLogger(ProjectJoinDaoImpl.class);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/api/query/dao/ResourceTagJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/ResourceTagJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/ResourceTagJoinDaoImpl.java
index 5adee9e..2d86ca0 100644
--- a/server/src/com/cloud/api/query/dao/ResourceTagJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/ResourceTagJoinDaoImpl.java
@@ -28,13 +28,15 @@ import com.cloud.api.query.vo.ResourceTagJoinVO;
 import com.cloud.configuration.dao.ConfigurationDao;
 
 import org.apache.cloudstack.api.response.ResourceTagResponse;
+import org.springframework.stereotype.Component;
+
 import com.cloud.server.ResourceTag;
 import com.cloud.utils.component.Inject;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 
-
+@Component
 @Local(value={ResourceTagJoinDao.class})
 public class ResourceTagJoinDaoImpl extends GenericDaoBase<ResourceTagJoinVO, Long> implements ResourceTagJoinDao {
     public static final Logger s_logger = Logger.getLogger(ResourceTagJoinDaoImpl.class);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/api/query/dao/SecurityGroupJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/SecurityGroupJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/SecurityGroupJoinDaoImpl.java
index c35c4aa..f6847aa 100644
--- a/server/src/com/cloud/api/query/dao/SecurityGroupJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/SecurityGroupJoinDaoImpl.java
@@ -31,6 +31,8 @@ import com.cloud.configuration.dao.ConfigurationDao;
 
 import org.apache.cloudstack.api.response.SecurityGroupResponse;
 import org.apache.cloudstack.api.response.SecurityGroupRuleResponse;
+import org.springframework.stereotype.Component;
+
 import com.cloud.network.security.SecurityGroup;
 import com.cloud.network.security.SecurityRule.SecurityRuleType;
 import com.cloud.user.Account;
@@ -39,6 +41,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 
+@Component
 @Local(value={SecurityGroupJoinDao.class})
 public class SecurityGroupJoinDaoImpl extends GenericDaoBase<SecurityGroupJoinVO, Long> implements SecurityGroupJoinDao {
     public static final Logger s_logger = Logger.getLogger(SecurityGroupJoinDaoImpl.class);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java
index 44ed130..53a0ffe 100644
--- a/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java
@@ -26,6 +26,7 @@ import com.cloud.api.ApiDBUtils;
 import com.cloud.api.query.vo.StoragePoolJoinVO;
 import com.cloud.configuration.dao.ConfigurationDao;
 import org.apache.cloudstack.api.response.StoragePoolResponse;
+import org.springframework.stereotype.Component;
 
 import com.cloud.storage.StoragePool;
 import com.cloud.storage.StorageStats;
@@ -35,6 +36,7 @@ import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 
 
+@Component
 @Local(value={StoragePoolJoinDao.class})
 public class StoragePoolJoinDaoImpl extends GenericDaoBase<StoragePoolJoinVO, Long> implements StoragePoolJoinDao {
     public static final Logger s_logger = Logger.getLogger(StoragePoolJoinDaoImpl.class);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/api/query/dao/UserAccountJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/UserAccountJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/UserAccountJoinDaoImpl.java
index b1f5dca..1bb3981 100644
--- a/server/src/com/cloud/api/query/dao/UserAccountJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/UserAccountJoinDaoImpl.java
@@ -29,6 +29,7 @@ import com.cloud.api.query.vo.UserAccountJoinVO;
 
 import org.apache.cloudstack.api.response.InstanceGroupResponse;
 import org.apache.cloudstack.api.response.UserResponse;
+import org.springframework.stereotype.Component;
 
 import com.cloud.user.Account;
 import com.cloud.user.User;
@@ -39,6 +40,7 @@ import com.cloud.utils.db.SearchCriteria;
 import com.cloud.vm.InstanceGroup;
 
 
+@Component
 @Local(value={UserAccountJoinDao.class})
 public class UserAccountJoinDaoImpl extends GenericDaoBase<UserAccountJoinVO, Long> implements UserAccountJoinDao {
     public static final Logger s_logger = Logger.getLogger(UserAccountJoinDaoImpl.class);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
index 3310518..ce3d808 100644
--- a/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
@@ -36,9 +36,10 @@ import org.apache.cloudstack.api.ApiConstants.VMDetails;
 import org.apache.cloudstack.api.response.NicResponse;
 import org.apache.cloudstack.api.response.SecurityGroupResponse;
 import org.apache.cloudstack.api.response.UserVmResponse;
+import org.springframework.stereotype.Component;
+
 import com.cloud.user.Account;
 import com.cloud.uservm.UserVm;
-import com.cloud.utils.component.ComponentLocator;
 import com.cloud.utils.component.Inject;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
@@ -46,6 +47,7 @@ import com.cloud.utils.db.SearchCriteria;
 import com.cloud.vm.VmStats;
 
 
+@Component
 @Local(value={UserVmJoinDao.class})
 public class UserVmJoinDaoImpl extends GenericDaoBase<UserVmJoinVO, Long> implements UserVmJoinDao {
     public static final Logger s_logger = Logger.getLogger(UserVmJoinDaoImpl.class);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
index 35ba2eb..65ecd1b 100644
--- a/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
@@ -30,6 +30,7 @@ import com.cloud.api.query.vo.VolumeJoinVO;
 import com.cloud.configuration.dao.ConfigurationDao;
 
 import org.apache.cloudstack.api.response.VolumeResponse;
+import org.springframework.stereotype.Component;
 
 import com.cloud.offering.ServiceOffering;
 import com.cloud.storage.Storage;
@@ -44,6 +45,7 @@ import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 
 
+@Component
 @Local(value={VolumeJoinDao.class})
 public class VolumeJoinDaoImpl extends GenericDaoBase<VolumeJoinVO, Long> implements VolumeJoinDao {
     public static final Logger s_logger = Logger.getLogger(VolumeJoinDaoImpl.class);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/async/SyncQueueManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/async/SyncQueueManagerImpl.java b/server/src/com/cloud/async/SyncQueueManagerImpl.java
index 5246e46..97ce8a6 100644
--- a/server/src/com/cloud/async/SyncQueueManagerImpl.java
+++ b/server/src/com/cloud/async/SyncQueueManagerImpl.java
@@ -36,7 +36,7 @@ import com.cloud.utils.db.DB;
 import com.cloud.utils.db.Transaction;
 import com.cloud.utils.exception.CloudRuntimeException;
 
-
+@Component
 @Local(value={SyncQueueManager.class})
 public class SyncQueueManagerImpl implements SyncQueueManager {
     public static final Logger s_logger = Logger.getLogger(SyncQueueManagerImpl.class.getName());

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/ha/HighAvailabilityManagerExtImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/ha/HighAvailabilityManagerExtImpl.java b/server/src/com/cloud/ha/HighAvailabilityManagerExtImpl.java
index 116f611..09e65a0 100644
--- a/server/src/com/cloud/ha/HighAvailabilityManagerExtImpl.java
+++ b/server/src/com/cloud/ha/HighAvailabilityManagerExtImpl.java
@@ -24,11 +24,16 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
+import org.springframework.context.annotation.Primary;
+import org.springframework.stereotype.Component;
+
 import com.cloud.alert.AlertManager;
 import com.cloud.configuration.dao.ConfigurationDao;
 import com.cloud.usage.dao.UsageJobDao;
 import com.cloud.utils.db.Transaction;
 
+@Component
+@Primary
 @Local(value={HighAvailabilityManager.class})
 public class HighAvailabilityManagerExtImpl extends HighAvailabilityManagerImpl {
 	

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java b/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java
index 58f428b..6df0822 100755
--- a/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java
+++ b/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java
@@ -31,6 +31,7 @@ import javax.naming.ConfigurationException;
 
 import org.apache.log4j.Logger;
 import org.apache.log4j.NDC;
+import org.springframework.stereotype.Component;
 
 import com.cloud.agent.AgentManager;
 import com.cloud.alert.AlertManager;
@@ -95,6 +96,7 @@ import com.cloud.vm.dao.VMInstanceDao;
  *         ha.retry.wait | time to wait before retrying the work item | seconds | 120 || || stop.retry.wait | time to wait
  *         before retrying the stop | seconds | 120 || * }
  **/
+@Component
 @Local(value = { HighAvailabilityManager.class })
 public class HighAvailabilityManagerImpl implements HighAvailabilityManager, ClusterManagerListener {
     protected static final Logger s_logger = Logger.getLogger(HighAvailabilityManagerImpl.class);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/network/NetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java
index 68ddbc0..84fcd32 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -57,18 +57,15 @@ import com.cloud.alert.AlertManager;
 import com.cloud.api.ApiDBUtils;
 
 import org.apache.cloudstack.api.command.user.network.ListNetworksCmd;
+import org.springframework.stereotype.Component;
+
 import com.cloud.configuration.Config;
 import com.cloud.configuration.ConfigurationManager;
 import com.cloud.configuration.Resource.ResourceType;
 import com.cloud.configuration.dao.ConfigurationDao;
 import com.cloud.dc.*;
 import com.cloud.dc.DataCenter.NetworkType;
-import com.cloud.dc.DataCenterVO;
-import com.cloud.dc.Pod;
-import com.cloud.dc.PodVlanMapVO;
-import com.cloud.dc.Vlan;
 import com.cloud.dc.Vlan.VlanType;
-import com.cloud.dc.VlanVO;
 import com.cloud.dc.dao.AccountVlanMapDao;
 import com.cloud.dc.dao.DataCenterDao;
 import com.cloud.dc.dao.PodVlanMapDao;
@@ -111,13 +108,6 @@ import com.cloud.network.lb.LoadBalancingRule.LbStickinessPolicy;
 import com.cloud.network.lb.LoadBalancingRulesManager;
 import com.cloud.network.rules.*;
 import com.cloud.network.rules.FirewallRule.Purpose;
-import com.cloud.network.rules.FirewallRuleVO;
-import com.cloud.network.rules.PortForwardingRule;
-import com.cloud.network.rules.PortForwardingRuleVO;
-import com.cloud.network.rules.RulesManager;
-import com.cloud.network.rules.StaticNat;
-import com.cloud.network.rules.StaticNatRule;
-import com.cloud.network.rules.StaticNatRuleImpl;
 import com.cloud.network.rules.dao.PortForwardingRulesDao;
 import com.cloud.network.vpc.NetworkACLManager;
 import com.cloud.network.vpc.PrivateIpVO;
@@ -173,6 +163,7 @@ import java.util.*;
 /**
  * NetworkManagerImpl implements NetworkManager.
  */
+@Component
 @Local(value = { NetworkManager.class, NetworkService.class })
 public class NetworkManagerImpl implements NetworkManager, NetworkService, Manager, Listener {
     private static final Logger s_logger = Logger.getLogger(NetworkManagerImpl.class);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/network/as/AutoScaleManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/as/AutoScaleManagerImpl.java b/server/src/com/cloud/network/as/AutoScaleManagerImpl.java
index 4c49914..d49f4aa 100644
--- a/server/src/com/cloud/network/as/AutoScaleManagerImpl.java
+++ b/server/src/com/cloud/network/as/AutoScaleManagerImpl.java
@@ -42,6 +42,8 @@ import org.apache.cloudstack.api.command.user.autoscale.ListAutoScaleVmGroupsCmd
 import org.apache.cloudstack.api.command.user.autoscale.ListConditionsCmd;
 import org.apache.cloudstack.api.command.user.autoscale.UpdateAutoScalePolicyCmd;
 import org.apache.cloudstack.api.command.user.autoscale.UpdateAutoScaleVmProfileCmd;
+import org.springframework.stereotype.Component;
+
 import com.cloud.configuration.Config;
 import com.cloud.configuration.ConfigurationManager;
 import com.cloud.configuration.dao.ConfigurationDao;
@@ -93,6 +95,7 @@ import com.cloud.utils.net.NetUtils;
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
 
+@Component
 @Local(value = { AutoScaleService.class, AutoScaleManager.class })
 public class AutoScaleManagerImpl<Type> implements AutoScaleManager, AutoScaleService, Manager {
     private static final Logger s_logger = Logger.getLogger(AutoScaleManagerImpl.class);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/network/as/dao/AutoScalePolicyConditionMapDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/as/dao/AutoScalePolicyConditionMapDaoImpl.java b/server/src/com/cloud/network/as/dao/AutoScalePolicyConditionMapDaoImpl.java
index 84dd191..cacebf0 100644
--- a/server/src/com/cloud/network/as/dao/AutoScalePolicyConditionMapDaoImpl.java
+++ b/server/src/com/cloud/network/as/dao/AutoScalePolicyConditionMapDaoImpl.java
@@ -19,11 +19,14 @@ package com.cloud.network.as.dao;
 import java.util.List;
 
 import javax.ejb.Local;
+
+import org.springframework.stereotype.Component;
 
 import com.cloud.network.as.AutoScalePolicyConditionMapVO;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchCriteria;
-
+
+@Component
 @Local(value={AutoScalePolicyConditionMapDao.class})
 public class AutoScalePolicyConditionMapDaoImpl extends GenericDaoBase<AutoScalePolicyConditionMapVO, Long> implements AutoScalePolicyConditionMapDao {
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/network/as/dao/AutoScalePolicyDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/as/dao/AutoScalePolicyDaoImpl.java b/server/src/com/cloud/network/as/dao/AutoScalePolicyDaoImpl.java
index f8f5491..05dbf31 100644
--- a/server/src/com/cloud/network/as/dao/AutoScalePolicyDaoImpl.java
+++ b/server/src/com/cloud/network/as/dao/AutoScalePolicyDaoImpl.java
@@ -17,11 +17,14 @@
 package com.cloud.network.as.dao;
 
 import javax.ejb.Local;
+
+import org.springframework.stereotype.Component;
 
 import com.cloud.network.as.AutoScalePolicyVO;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchCriteria;
-
+
+@Component
 @Local(value = { AutoScalePolicyDao.class })
 public class AutoScalePolicyDaoImpl extends GenericDaoBase<AutoScalePolicyVO, Long>  implements AutoScalePolicyDao {
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/network/as/dao/AutoScaleVmGroupDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/as/dao/AutoScaleVmGroupDaoImpl.java b/server/src/com/cloud/network/as/dao/AutoScaleVmGroupDaoImpl.java
index 80f2bee..ae4ab2c 100644
--- a/server/src/com/cloud/network/as/dao/AutoScaleVmGroupDaoImpl.java
+++ b/server/src/com/cloud/network/as/dao/AutoScaleVmGroupDaoImpl.java
@@ -19,13 +19,16 @@ package com.cloud.network.as.dao;
 import java.util.List;
 
 import javax.ejb.Local;
+
+import org.springframework.stereotype.Component;
 
 import com.cloud.network.as.AutoScaleVmGroupVO;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.GenericSearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.SearchCriteria.Func;
-
+
+@Component
 @Local(value = { AutoScaleVmGroupDao.class })
 public class AutoScaleVmGroupDaoImpl extends GenericDaoBase<AutoScaleVmGroupVO, Long>  implements AutoScaleVmGroupDao {
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/network/as/dao/AutoScaleVmGroupPolicyMapDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/as/dao/AutoScaleVmGroupPolicyMapDaoImpl.java b/server/src/com/cloud/network/as/dao/AutoScaleVmGroupPolicyMapDaoImpl.java
index c33a55f..b0d064e 100644
--- a/server/src/com/cloud/network/as/dao/AutoScaleVmGroupPolicyMapDaoImpl.java
+++ b/server/src/com/cloud/network/as/dao/AutoScaleVmGroupPolicyMapDaoImpl.java
@@ -19,13 +19,16 @@ package com.cloud.network.as.dao;
 import java.util.List;
 
 import javax.ejb.Local;
+
+import org.springframework.stereotype.Component;
 
 import com.cloud.network.as.AutoScaleVmGroupPolicyMapVO;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.SearchCriteria.Op;
-
+
+@Component
 @Local(value={AutoScaleVmGroupPolicyMapDao.class})
 public class AutoScaleVmGroupPolicyMapDaoImpl extends GenericDaoBase<AutoScaleVmGroupPolicyMapVO, Long> implements AutoScaleVmGroupPolicyMapDao {
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/network/as/dao/AutoScaleVmProfileDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/as/dao/AutoScaleVmProfileDaoImpl.java b/server/src/com/cloud/network/as/dao/AutoScaleVmProfileDaoImpl.java
index d2b162b..99c3cc2 100644
--- a/server/src/com/cloud/network/as/dao/AutoScaleVmProfileDaoImpl.java
+++ b/server/src/com/cloud/network/as/dao/AutoScaleVmProfileDaoImpl.java
@@ -17,11 +17,14 @@
 package com.cloud.network.as.dao;
 
 import javax.ejb.Local;
+
+import org.springframework.stereotype.Component;
 
 import com.cloud.network.as.AutoScaleVmProfileVO;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchCriteria;
-
+
+@Component
 @Local(value = { AutoScaleVmProfileDao.class })
 public class AutoScaleVmProfileDaoImpl extends GenericDaoBase<AutoScaleVmProfileVO, Long>  implements AutoScaleVmProfileDao {
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/network/as/dao/ConditionDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/as/dao/ConditionDaoImpl.java b/server/src/com/cloud/network/as/dao/ConditionDaoImpl.java
index 4f71d45..8235823 100644
--- a/server/src/com/cloud/network/as/dao/ConditionDaoImpl.java
+++ b/server/src/com/cloud/network/as/dao/ConditionDaoImpl.java
@@ -19,12 +19,15 @@ package com.cloud.network.as.dao;
 
 import javax.ejb.Local;
 
+import org.springframework.stereotype.Component;
+
 import com.cloud.network.as.ConditionVO;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.SearchCriteria.Op;
 
+@Component
 @Local(value = ConditionDao.class)
 public class ConditionDaoImpl extends GenericDaoBase<ConditionVO, Long> implements ConditionDao {
     final SearchBuilder<ConditionVO> AllFieldsSearch;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/network/as/dao/CounterDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/as/dao/CounterDaoImpl.java b/server/src/com/cloud/network/as/dao/CounterDaoImpl.java
index 829d538..0abc3a0 100644
--- a/server/src/com/cloud/network/as/dao/CounterDaoImpl.java
+++ b/server/src/com/cloud/network/as/dao/CounterDaoImpl.java
@@ -21,6 +21,8 @@ import java.util.List;
 
 import javax.ejb.Local;
 
+import org.springframework.stereotype.Component;
+
 import com.cloud.network.as.CounterVO;
 import com.cloud.utils.db.Filter;
 import com.cloud.utils.db.GenericDaoBase;
@@ -28,6 +30,7 @@ import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.SearchCriteria.Op;
 
+@Component
 @Local(value = CounterDao.class)
 public class CounterDaoImpl extends GenericDaoBase<CounterVO, Long> implements CounterDao {
     final SearchBuilder<CounterVO> AllFieldsSearch;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/network/dao/NetworkDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/dao/NetworkDaoImpl.java b/server/src/com/cloud/network/dao/NetworkDaoImpl.java
index c3559b6..c6a65dd 100644
--- a/server/src/com/cloud/network/dao/NetworkDaoImpl.java
+++ b/server/src/com/cloud/network/dao/NetworkDaoImpl.java
@@ -22,6 +22,7 @@ import java.util.Random;
 
 import javax.annotation.PostConstruct;
 import javax.ejb.Local;
+import javax.inject.Inject;
 import javax.persistence.TableGenerator;
 
 import org.apache.cloudstack.acl.ControlledEntity.ACLType;
@@ -78,12 +79,12 @@ public class NetworkDaoImpl extends GenericDaoBase<NetworkVO, Long> implements N
     GenericSearchBuilder<NetworkVO, Long> VpcNetworksCount;
     SearchBuilder<NetworkVO> OfferingAccountNetworkSearch;
 
-    ResourceTagsDaoImpl _tagsDao = ComponentLocator.inject(ResourceTagsDaoImpl.class);
-    NetworkAccountDaoImpl _accountsDao = ComponentLocator.inject(NetworkAccountDaoImpl.class);
-    NetworkDomainDaoImpl _domainsDao = ComponentLocator.inject(NetworkDomainDaoImpl.class);
-    NetworkOpDaoImpl _opDao = ComponentLocator.inject(NetworkOpDaoImpl.class);
-    NetworkServiceMapDaoImpl _ntwkSvcMap = ComponentLocator.inject(NetworkServiceMapDaoImpl.class);
-    NetworkOfferingDaoImpl _ntwkOffDao = ComponentLocator.inject(NetworkOfferingDaoImpl.class);
+    @Inject ResourceTagsDaoImpl _tagsDao;
+    @Inject NetworkAccountDaoImpl _accountsDao;
+    @Inject NetworkDomainDaoImpl _domainsDao;
+    @Inject NetworkOpDaoImpl _opDao;
+    @Inject NetworkServiceMapDaoImpl _ntwkSvcMap;
+    @Inject NetworkOfferingDaoImpl _ntwkOffDao;
 
 
     TableGenerator _tgMacAddress;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/secstorage/PremiumSecondaryStorageManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/secstorage/PremiumSecondaryStorageManagerImpl.java b/server/src/com/cloud/secstorage/PremiumSecondaryStorageManagerImpl.java
index 73015c1..d4f4454 100755
--- a/server/src/com/cloud/secstorage/PremiumSecondaryStorageManagerImpl.java
+++ b/server/src/com/cloud/secstorage/PremiumSecondaryStorageManagerImpl.java
@@ -49,6 +49,8 @@ import com.cloud.vm.SystemVmLoadScanner.AfterScanAction;
 import com.cloud.vm.VirtualMachine.State;
 import com.cloud.vm.dao.SecondaryStorageVmDao;
 
+@Component
+@Primary
 @Local(value = { SecondaryStorageVmManager.class })
 public class PremiumSecondaryStorageManagerImpl extends SecondaryStorageManagerImpl {
     private static final Logger s_logger = Logger.getLogger(PremiumSecondaryStorageManagerImpl.class);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/server/ManagementServerExtImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ManagementServerExtImpl.java b/server/src/com/cloud/server/ManagementServerExtImpl.java
index 5ec75f1..03e50eb 100644
--- a/server/src/com/cloud/server/ManagementServerExtImpl.java
+++ b/server/src/com/cloud/server/ManagementServerExtImpl.java
@@ -33,6 +33,8 @@ import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.exception.PermissionDeniedException;
 import com.cloud.projects.Project;
 import org.apache.cloudstack.api.response.UsageTypeResponse;
+import org.springframework.stereotype.Component;
+
 import com.cloud.usage.UsageJobVO;
 import com.cloud.usage.UsageTypes;
 import com.cloud.usage.UsageVO;
@@ -46,6 +48,7 @@ import com.cloud.utils.db.Filter;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.Transaction;
 
+@Component
 public class ManagementServerExtImpl extends ManagementServerImpl implements ManagementServerExt {
     @Inject private AccountDao _accountDao;
     @Inject private DomainDao _domainDao;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/server/ManagementServerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java
index 95d96d0..60bab00 100755
--- a/server/src/com/cloud/server/ManagementServerImpl.java
+++ b/server/src/com/cloud/server/ManagementServerImpl.java
@@ -381,8 +381,8 @@ public class ManagementServerImpl implements ManagementServer {
     S3Manager _s3Mgr;
 
     @Inject
-    ComponentContext _placeholder;
-
+    ComponentContext _placeholder;			// create a dependency to ComponentContext so that it can be loaded beforehead
+ 
     private final ScheduledExecutorService _eventExecutor = Executors.newScheduledThreadPool(1, new NamedThreadFactory("EventChecker"));
     private KeystoreManager _ksMgr;
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/storage/dao/S3DaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/dao/S3DaoImpl.java b/server/src/com/cloud/storage/dao/S3DaoImpl.java
index 6162e6e..f0dd078 100644
--- a/server/src/com/cloud/storage/dao/S3DaoImpl.java
+++ b/server/src/com/cloud/storage/dao/S3DaoImpl.java
@@ -24,6 +24,9 @@ import com.cloud.utils.db.GenericDaoBase;
 
 import javax.ejb.Local;
 
+import org.springframework.stereotype.Component;
+
+@Component
 @Local(S3Dao.class)
 public class S3DaoImpl extends GenericDaoBase<S3VO, Long> implements S3Dao {
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/storage/dao/VMTemplateS3DaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/dao/VMTemplateS3DaoImpl.java b/server/src/com/cloud/storage/dao/VMTemplateS3DaoImpl.java
index f23b803..7cfd3b5 100644
--- a/server/src/com/cloud/storage/dao/VMTemplateS3DaoImpl.java
+++ b/server/src/com/cloud/storage/dao/VMTemplateS3DaoImpl.java
@@ -27,8 +27,12 @@ import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 
 import javax.ejb.Local;
+
+import org.springframework.stereotype.Component;
+
 import java.util.List;
 
+@Component
 @Local(VMTemplateS3Dao.class)
 public class VMTemplateS3DaoImpl extends GenericDaoBase<VMTemplateS3VO, Long>
         implements VMTemplateS3Dao {

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/storage/s3/S3ManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/s3/S3ManagerImpl.java b/server/src/com/cloud/storage/s3/S3ManagerImpl.java
index 1db809b..069edf3 100644
--- a/server/src/com/cloud/storage/s3/S3ManagerImpl.java
+++ b/server/src/com/cloud/storage/s3/S3ManagerImpl.java
@@ -54,6 +54,8 @@ import com.cloud.agent.api.DownloadTemplateFromS3ToSecondaryStorageCommand;
 import com.cloud.agent.api.UploadTemplateToS3FromSecondaryStorageCommand;
 import com.cloud.agent.api.to.S3TO;
 import org.apache.cloudstack.api.command.admin.storage.ListS3sCmd;
+import org.springframework.stereotype.Component;
+
 import com.cloud.configuration.Config;
 import com.cloud.configuration.dao.ConfigurationDao;
 import com.cloud.dc.DataCenterVO;
@@ -80,6 +82,7 @@ import com.cloud.utils.db.Filter;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.exception.CloudRuntimeException;
 
+@Component
 @Local(value = { S3Manager.class })
 public class S3ManagerImpl implements S3Manager {
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java b/server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java
index 8638cf4..81d8396 100755
--- a/server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java
+++ b/server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java
@@ -30,6 +30,8 @@ import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
 import org.apache.log4j.Logger;
+import org.springframework.context.annotation.Primary;
+import org.springframework.stereotype.Component;
 
 import com.cloud.agent.AgentManager;
 import com.cloud.agent.api.Answer;
@@ -153,6 +155,7 @@ import com.cloud.vm.dao.VMInstanceDao;
 // Starting, HA, Migrating, Creating and Running state are all counted as "Open" for available capacity calculation
 // because sooner or later, it will be driven into Running state
 //
+@Component
 @Local(value = { SecondaryStorageVmManager.class })
 public class SecondaryStorageManagerImpl implements SecondaryStorageVmManager, VirtualMachineGuru<SecondaryStorageVmVO>, SystemVmLoadScanHandler<Long>, ResourceStateAdapter {
     private static final Logger s_logger = Logger.getLogger(SecondaryStorageManagerImpl.class);
@@ -217,7 +220,7 @@ public class SecondaryStorageManagerImpl implements SecondaryStorageVmManager, V
     UserVmDetailsDao _vmDetailsDao;
     @Inject 
     protected ResourceManager _resourceMgr;
-    @Inject
+    //@Inject			// TODO this is a very strange usage, a singleton class need to inject itself?
     protected SecondaryStorageVmManager _ssvmMgr;
     @Inject
     NetworkDao _networkDao;
@@ -245,6 +248,10 @@ public class SecondaryStorageManagerImpl implements SecondaryStorageVmManager, V
 
     private final GlobalLock _allocLock = GlobalLock.getInternLock(getAllocLockName());
 
+    public SecondaryStorageManagerImpl() {
+    	_ssvmMgr = this;
+    }
+    
     @Override
     public SecondaryStorageVmVO startSecStorageVm(long secStorageVmId) {
         try {
@@ -888,9 +895,6 @@ public class SecondaryStorageManagerImpl implements SecondaryStorageVmManager, V
         return true;
     }
 
-    protected SecondaryStorageManagerImpl() {
-    }
-
     @Override
     public Long convertToId(String vmName) {
         if (!VirtualMachineName.isValidSystemVmName(vmName, _instance, "s")) {

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/vm/ClusteredVirtualMachineManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/ClusteredVirtualMachineManagerImpl.java b/server/src/com/cloud/vm/ClusteredVirtualMachineManagerImpl.java
index dc51eab..96c7446 100644
--- a/server/src/com/cloud/vm/ClusteredVirtualMachineManagerImpl.java
+++ b/server/src/com/cloud/vm/ClusteredVirtualMachineManagerImpl.java
@@ -22,9 +22,14 @@ import java.util.Map;
 import javax.ejb.Local;
 import javax.naming.ConfigurationException;
 
+import org.springframework.context.annotation.Primary;
+import org.springframework.stereotype.Component;
+
 import com.cloud.cluster.ClusterManagerListener;
 import com.cloud.cluster.ManagementServerHostVO;
 
+@Component
+@Primary
 @Local(value=VirtualMachineManager.class)
 public class ClusteredVirtualMachineManagerImpl extends VirtualMachineManagerImpl implements ClusterManagerListener {
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/vm/UserVmManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java
index d4fff18..55d0d4f 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -54,6 +54,7 @@ import org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntity;
 import org.apache.cloudstack.engine.service.api.OrchestrationService;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
 
 import com.cloud.agent.AgentManager;
 import com.cloud.agent.api.Answer;
@@ -236,6 +237,7 @@ import com.cloud.vm.dao.UserVmDao;
 import com.cloud.vm.dao.UserVmDetailsDao;
 import com.cloud.vm.dao.VMInstanceDao;
 
+@Component
 @Local(value = { UserVmManager.class, UserVmService.class })
 public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager {
     private static final Logger s_logger = Logger

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0bcebd33/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
index 0b1e2da..2897a63 100755
--- a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -158,6 +158,7 @@ import com.cloud.vm.dao.SecondaryStorageVmDao;
 import com.cloud.vm.dao.UserVmDao;
 import com.cloud.vm.dao.VMInstanceDao;
 
+@Component
 @Local(value = VirtualMachineManager.class)
 public class VirtualMachineManagerImpl implements VirtualMachineManager, Listener {
     private static final Logger s_logger = Logger.getLogger(VirtualMachineManagerImpl.class);


Mime
View raw message