cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [1/2] git commit: updated refs/heads/vmsync to 186e62a
Date Sun, 09 Jun 2013 23:39:31 GMT
Updated Branches:
  refs/heads/vmsync 59c211fca -> 186e62a86


Fixed problem with serializer


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

Branch: refs/heads/vmsync
Commit: 1f3d1238663fc447f2f160002e6106edb0107aac
Parents: 59c211f
Author: Alex Huang <alex.huang@gmail.com>
Authored: Sun Jun 9 04:38:09 2013 -0700
Committer: Alex Huang <alex.huang@gmail.com>
Committed: Sun Jun 9 04:38:09 2013 -0700

----------------------------------------------------------------------
 .../apache/cloudstack/framework/jobs/impl/JobSerializerHelper.java | 1 +
 server/src/com/cloud/vm/VmWorkJobDispatcher.java                   | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1f3d1238/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/JobSerializerHelper.java
----------------------------------------------------------------------
diff --git a/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/JobSerializerHelper.java
b/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/JobSerializerHelper.java
index 33a1df7..6acc933 100644
--- a/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/JobSerializerHelper.java
+++ b/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/JobSerializerHelper.java
@@ -55,6 +55,7 @@ public class JobSerializerHelper {
         gsonBuilder.setVersion(1.5);
         s_logger.debug("Job GSON Builder initialized.");
         gsonBuilder.registerTypeAdapter(Class.class, new ClassTypeAdapter());
+        gsonBuilder.registerTypeAdapter(Throwable.class, new ThrowableTypeAdapter());
         s_gson = gsonBuilder.create();
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1f3d1238/server/src/com/cloud/vm/VmWorkJobDispatcher.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/VmWorkJobDispatcher.java b/server/src/com/cloud/vm/VmWorkJobDispatcher.java
index dcb91d2..8b04e91 100644
--- a/server/src/com/cloud/vm/VmWorkJobDispatcher.java
+++ b/server/src/com/cloud/vm/VmWorkJobDispatcher.java
@@ -77,7 +77,7 @@ public class VmWorkJobDispatcher extends AdapterBase implements AsyncJobDispatch
             _asyncJobMgr.completeAsyncJob(job.getId(), AsyncJobConstants.STATUS_SUCCEEDED,
0, null);
         } catch(Throwable e) {
             s_logger.error("Unable to complete " + job, e);
-            _asyncJobMgr.completeAsyncJob(job.getId(), AsyncJobConstants.STATUS_FAILED, 0,
e);
+            _asyncJobMgr.completeAsyncJob(job.getId(), AsyncJobConstants.STATUS_FAILED, 0,
e.getMessage());
         } finally {
             CallContext.unregister();
         }


Mime
View raw message