servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r389084 - /incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/DeploymentService.java
Date Mon, 27 Mar 2006 09:33:37 GMT
Author: gnodet
Date: Mon Mar 27 01:33:36 2006
New Revision: 389084

URL: http://svn.apache.org/viewcvs?rev=389084&view=rev
Log:
Keep the exception that the component threw if the message is not an xml string

Modified:
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/DeploymentService.java

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/DeploymentService.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/DeploymentService.java?rev=389084&r1=389083&r2=389084&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/DeploymentService.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/DeploymentService.java
Mon Mar 27 01:33:36 2006
@@ -530,7 +530,7 @@
                     }
                     // TODO: need to register the SU somewhere to keep track of its state
                 } catch (Exception e) {
-                    getComponentTaskResult(e.getMessage(), componentName, componentResults,
false);
+                    getComponentTaskError(e, componentName, componentResults);
                 }
                 if (success) {
                     nbSuccess++;
@@ -576,6 +576,21 @@
         }
     }
     
+    protected void getComponentTaskError(Exception exception, String component, List results)
{
+        Element result = null;
+        try {
+            Document doc = parse(exception.getMessage());
+            result = getElement(doc, "component-task-result");
+        } catch (Exception e) {
+            result = ManagementSupport.createComponentFailure(
+                    "deploy", component,
+                    "Unable to parse result string", exception);
+        }
+        if (result != null) {
+            results.add(result);
+        }
+    }
+
     protected boolean getComponentTaskResult(String resultMsg, String component, List results,
boolean success) {
         Element result = null;
         try {



Mime
View raw message