tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r827009 - /tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/context/ReflectiveInstanceWrapper.java
Date Tue, 20 Oct 2009 09:02:23 GMT
Author: antelder
Date: Tue Oct 20 09:02:23 2009
New Revision: 827009

URL: http://svn.apache.org/viewvc?rev=827009&view=rev
Log:
Call destroy if there's an excpeption while calling the init method, to fix JCA_4005

Modified:
    tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/context/ReflectiveInstanceWrapper.java

Modified: tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/context/ReflectiveInstanceWrapper.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/context/ReflectiveInstanceWrapper.java?rev=827009&r1=827008&r2=827009&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/context/ReflectiveInstanceWrapper.java
(original)
+++ tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/context/ReflectiveInstanceWrapper.java
Tue Oct 20 09:02:23 2009
@@ -43,7 +43,16 @@
 
     public void start() throws TargetInitializationException {
         if (initInvoker != null) {
-            initInvoker.invokeEvent(instance);
+            try {
+                initInvoker.invokeEvent(instance);
+            } catch (Exception e) {
+                try {
+                    stop();
+                } catch (TargetDestructionException e1) {
+                    throw new TargetInitializationException("TargetDestructionException while
handling init exception", e);
+                }
+                throw new TargetInitializationException(e);
+            }
         }
     }
 



Mime
View raw message