incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kelv...@apache.org
Subject git commit: Fix a few Spring issues to Bootstrap javaline server
Date Sat, 22 Dec 2012 00:49:49 GMT
Updated Branches:
  refs/heads/javelin ac88c16be -> 877e16029


Fix a few Spring issues to Bootstrap javaline server


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

Branch: refs/heads/javelin
Commit: 877e16029c4175b5c8729ab3e8ae8ed0314152c1
Parents: ac88c16
Author: Kelven Yang <kelveny@gmail.com>
Authored: Fri Dec 21 16:49:27 2012 -0800
Committer: Kelven Yang <kelveny@gmail.com>
Committed: Fri Dec 21 16:49:27 2012 -0800

----------------------------------------------------------------------
 client/cloudstack-ui.launch                        |    2 +-
 client/pom.xml                                     |   72 +++++++++++++++
 client/tomcatconf/applicationContext.xml.in        |   46 +++++++++-
 .../cloudstack/storage/image/ImageServiceImpl.java |    3 +
 .../storage/HypervsiorHostEndPointRpcServer.java   |   13 +++-
 .../image/db/ImageDataStoreProviderDaoImpl.java    |    6 +-
 .../DefaultPrimaryDatastoreProviderImpl.java       |   16 +++
 .../storage/volume/VolumeServiceImpl.java          |    3 +
 framework/ipc/pom.xml                              |    1 +
 .../com/cloud/server/ConfigurationServerImpl.java  |    2 +
 10 files changed, 158 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/877e1602/client/cloudstack-ui.launch
----------------------------------------------------------------------
diff --git a/client/cloudstack-ui.launch b/client/cloudstack-ui.launch
index 0f09a5e..fbf0cab 100644
--- a/client/cloudstack-ui.launch
+++ b/client/cloudstack-ui.launch
@@ -7,7 +7,7 @@
 <stringAttribute key="M2_PROFILES" value=""/>
 <listAttribute key="M2_PROPERTIES"/>
 <stringAttribute key="M2_RUNTIME" value="EMBEDDED"/>
-<booleanAttribute key="M2_SKIP_TESTS" value="false"/>
+<booleanAttribute key="M2_SKIP_TESTS" value="true"/>
 <booleanAttribute key="M2_UPDATE_SNAPSHOTS" value="false"/>
 <booleanAttribute key="M2_WORKSPACE_RESOLUTION" value="true"/>
 <stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.m2e.launching.MavenSourceLocator"/>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/877e1602/client/pom.xml
----------------------------------------------------------------------
diff --git a/client/pom.xml b/client/pom.xml
index 0a13876..a50725a 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -103,6 +103,78 @@
       <version>5.1.21</version>
       <scope>runtime</scope>
     </dependency>
+    <dependency>
+    	<groupId>org.apache.cloudstack</groupId>
+    	<artifactId>cloud-framework-ipc</artifactId>
+        <version>${project.version}</version>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.cloudstack</groupId>
+        <artifactId>cloud-framework-rest</artifactId>
+        <version>${project.version}</version>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.cloudstack</groupId>
+        <artifactId>cloud-engine-api</artifactId>
+        <version>${project.version}</version>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.cloudstack</groupId>
+    	<artifactId>cloud-engine-components-api</artifactId>
+    	<version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+        <groupId>org.apache.cloudstack</groupId>
+        <artifactId>cloud-engine-compute</artifactId>
+        <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+        <groupId>org.apache.cloudstack</groupId>
+        <artifactId>cloud-engine-network</artifactId>
+        <version>${project.version}</version>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.cloudstack</groupId>
+        <artifactId>cloud-engine-orchestration</artifactId>
+        <version>${project.version}</version>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.cloudstack</groupId>
+        <artifactId>cloud-engine-schema</artifactId>
+        <version>${project.version}</version>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.cloudstack</groupId>
+        <artifactId>cloud-engine-storage</artifactId>
+        <version>${project.version}</version>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.cloudstack</groupId>
+        <artifactId>cloud-engine-storage-backup</artifactId>
+        <version>${project.version}</version>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.cloudstack</groupId>
+        <artifactId>cloud-engine-storage-image</artifactId>
+        <version>${project.version}</version>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.cloudstack</groupId>
+        <artifactId>cloud-engine-storage-imagemotion</artifactId>
+        <version>${project.version}</version>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.cloudstack</groupId>
+        <artifactId>cloud-engine-storage-snapshot</artifactId>
+        <version>${project.version}</version>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.cloudstack</groupId>
+        <artifactId>cloud-engine-storage-volume</artifactId>
+        <version>${project.version}</version>
+    </dependency>
   </dependencies>
   <build>
     <defaultGoal>install</defaultGoal>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/877e1602/client/tomcatconf/applicationContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/applicationContext.xml.in b/client/tomcatconf/applicationContext.xml.in
index 0febee3..34bb853 100644
--- a/client/tomcatconf/applicationContext.xml.in
+++ b/client/tomcatconf/applicationContext.xml.in
@@ -13,9 +13,49 @@
                       http://www.springframework.org/schema/context/spring-context-3.0.xsd">
                    
 
   <context:annotation-config />
-  
- <!-- 
+
   <context:component-scan base-package="org.apache.cloudstack, com.cloud" />
--->
+
+  <!--
+    @DB support
+  -->
+  <aop:config proxy-target-class="true">
+    <aop:aspect id="dbContextBuilder" ref="transactionContextBuilder">
+    <aop:pointcut id="captureAnyMethod"
+      expression="execution(* *(..))" />
+      <aop:around pointcut-ref="captureAnyMethod" method="AroundAnyMethod"/> 
+    </aop:aspect>
+  </aop:config>
+
+  <bean id="transactionContextBuilder" class="com.cloud.utils.db.TransactionContextBuilder"
/>
+
+  <!--
+    RPC/Async/EventBus
+  -->
+  <bean id="onwireRegistry" class="org.apache.cloudstack.framework.serializer.OnwireClassRegistry"
+    init-method="scan" >
+    <property name="packages">
+      <list>
+        <value>org.apache.cloudstack.framework</value>
+      </list>
+    </property>
+  </bean>
+  
+  <bean id="messageSerializer" class="org.apache.cloudstack.framework.serializer.JsonMessageSerializer">
+    <property name="onwireClassRegistry" ref="onwireRegistry" />
+  </bean>
+
+  <bean id="transportProvider" class="org.apache.cloudstack.framework.server.ServerTransportProvider"
 init-method="initialize">
+    <property name="workerPoolSize" value="5" />
+    <property name="nodeId" value="Node1" />
+    <property name="messageSerializer" ref="messageSerializer" />
+  </bean>
+  
+  <bean id="rpcProvider" class="org.apache.cloudstack.framework.rpc.RpcProviderImpl" init-method="initialize">
+    <constructor-arg ref="transportProvider" />
+    <property name="messageSerializer" ref="messageSerializer" />
+  </bean>
+
+  <bean id="eventBus" class = "org.apache.cloudstack.framework.eventbus.EventBusBase"
/>
 
 </beans>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/877e1602/engine/storage/image/src/org/apache/cloudstack/storage/image/ImageServiceImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/ImageServiceImpl.java
b/engine/storage/image/src/org/apache/cloudstack/storage/image/ImageServiceImpl.java
index 6499db1..4b65831 100644
--- a/engine/storage/image/src/org/apache/cloudstack/storage/image/ImageServiceImpl.java
+++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/ImageServiceImpl.java
@@ -33,6 +33,9 @@ public class ImageServiceImpl implements ImageService {
     @Inject
     ImageDataStoreProviderManager imageStoreProviderMgr;
 
+    public ImageServiceImpl() {
+    }
+    
     @Override
     public TemplateEntity registerTemplate(long templateId, long imageStoreId) {
         ImageDataStore ids = imageStoreProviderMgr.getDataStore(imageStoreId);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/877e1602/engine/storage/src/org/apache/cloudstack/storage/HypervsiorHostEndPointRpcServer.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/HypervsiorHostEndPointRpcServer.java
b/engine/storage/src/org/apache/cloudstack/storage/HypervsiorHostEndPointRpcServer.java
index 0975869..45d3fcf 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/HypervsiorHostEndPointRpcServer.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/HypervsiorHostEndPointRpcServer.java
@@ -18,6 +18,7 @@
  */
 package org.apache.cloudstack.storage;
 
+import javax.annotation.PostConstruct;
 import javax.inject.Inject;
 
 import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher;
@@ -37,13 +38,23 @@ import com.cloud.utils.exception.CloudRuntimeException;
 @Component
 public class HypervsiorHostEndPointRpcServer implements HostEndpointRpcServer {
     private static final Logger s_logger = Logger.getLogger(HypervsiorHostEndPointRpcServer.class);
-    private RpcProvider _rpcProvider;
+    
     @Inject
+    private RpcProvider _rpcProvider;
+    
+    public HypervsiorHostEndPointRpcServer() {
+    }
+    
     public HypervsiorHostEndPointRpcServer(RpcProvider rpcProvider) {
         _rpcProvider = rpcProvider;
         _rpcProvider.registerRpcServiceEndpoint(RpcServiceDispatcher.getDispatcher(this));
     }
     
+    @PostConstruct
+    public void Initialize() {
+        _rpcProvider.registerRpcServiceEndpoint(RpcServiceDispatcher.getDispatcher(this));
+    }
+    
     @Override
     public void sendCommandAsync(HypervisorHostEndPoint host, final Command command, final
AsyncCompletionCallback<Answer> callback) {
         _rpcProvider.newCall(host.getHostAddr()).addCallbackListener(new RpcCallbackListener<Answer>()
{

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/877e1602/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageDataStoreProviderDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageDataStoreProviderDaoImpl.java
b/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageDataStoreProviderDaoImpl.java
index f86bf15..0e19dbe 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageDataStoreProviderDaoImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageDataStoreProviderDaoImpl.java
@@ -27,7 +27,11 @@ import com.cloud.utils.db.SearchCriteria.Op;
 
 @Component
 public class ImageDataStoreProviderDaoImpl extends GenericDaoBase<ImageDataStoreProviderVO,
Long> implements ImageDataStoreProviderDao {
-    @Override
+
+	public ImageDataStoreProviderDaoImpl() {
+	}
+	
+	@Override
     public ImageDataStoreProviderVO findByName(String name) {
         SearchCriteriaService<ImageDataStoreProviderVO, ImageDataStoreProviderVO> service
= SearchCriteria2.create(ImageDataStoreProviderVO.class);
         service.addAnd(service.getEntity().getName(), Op.EQ, name);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/877e1602/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultPrimaryDatastoreProviderImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultPrimaryDatastoreProviderImpl.java
b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultPrimaryDatastoreProviderImpl.java
index 698762a..9953708 100644
--- a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultPrimaryDatastoreProviderImpl.java
+++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultPrimaryDatastoreProviderImpl.java
@@ -6,6 +6,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import javax.annotation.PostConstruct;
 import javax.inject.Inject;
 
 import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreLifeCycle;
@@ -43,6 +44,21 @@ public class DefaultPrimaryDatastoreProviderImpl implements PrimaryDataStoreProv
     protected ClusterDao clusterDao;
     protected Map<String, PrimaryDataStoreConfigurator> configuratorMaps = new HashMap<String,
PrimaryDataStoreConfigurator>();
 
+    @Qualifier("defaultProvider") 
+    @Inject
+    List<PrimaryDataStoreConfigurator> defaultConfigurators;
+    
+    public DefaultPrimaryDatastoreProviderImpl() {
+    }
+    
+    @PostConstruct
+    public void intialize() {
+        for (PrimaryDataStoreConfigurator configurator : defaultConfigurators) {
+            String key = generateKey(configurator.getSupportedHypervisor(), configurator.getSupportedDataStoreType().toString());
+            configuratorMaps.put(key, configurator);
+        }
+    }
+
     @Inject
     public DefaultPrimaryDatastoreProviderImpl(@Qualifier("defaultProvider") List<PrimaryDataStoreConfigurator>
configurators) {
         for (PrimaryDataStoreConfigurator configurator : configurators) {

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/877e1602/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
index 5ae6ed9..10a298a 100644
--- a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
+++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
@@ -56,6 +56,9 @@ public class VolumeServiceImpl implements VolumeService {
     @Inject
     ImageMotionService imageMotion;
 
+    public VolumeServiceImpl() {
+    }
+    
     @Override
     public VolumeInfo createVolume(VolumeInfo volume, long dataStoreId, VolumeDiskType diskType)
{
         PrimaryDataStore dataStore = dataStoreMgr.getPrimaryDataStore(dataStoreId);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/877e1602/framework/ipc/pom.xml
----------------------------------------------------------------------
diff --git a/framework/ipc/pom.xml b/framework/ipc/pom.xml
index 435cfee..b630f47 100644
--- a/framework/ipc/pom.xml
+++ b/framework/ipc/pom.xml
@@ -14,6 +14,7 @@
   <groupId>org.apache.cloudstack</groupId>
   <artifactId>cloud-framework-ipc</artifactId>
   <version>4.1.0-SNAPSHOT</version>
+  
   <dependencies>
     <!-- <dependency> <groupId>org.hornetq</groupId> <artifactId>hornetq-core-client</artifactId>

       <version>snap-r9548</version> </dependency> -->

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/877e1602/server/src/com/cloud/server/ConfigurationServerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ConfigurationServerImpl.java b/server/src/com/cloud/server/ConfigurationServerImpl.java
index 28893da..7b509cd 100755
--- a/server/src/com/cloud/server/ConfigurationServerImpl.java
+++ b/server/src/com/cloud/server/ConfigurationServerImpl.java
@@ -44,6 +44,7 @@ import javax.crypto.SecretKey;
 
 import org.apache.commons.codec.binary.Base64;
 import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
 
 import com.cloud.configuration.Config;
 import com.cloud.configuration.ConfigurationVO;
@@ -105,6 +106,7 @@ import com.cloud.utils.net.NetUtils;
 import com.cloud.utils.script.Script;
 import com.cloud.uuididentity.dao.IdentityDao;
 
+@Component
 public class ConfigurationServerImpl implements ConfigurationServer {
     public static final Logger s_logger = Logger.getLogger(ConfigurationServerImpl.class.getName());
 


Mime
View raw message