tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r826981 - /tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/context/ReflectiveInstanceFactory.java
Date Tue, 20 Oct 2009 07:32:11 GMT
Author: antelder
Date: Tue Oct 20 07:32:11 2009
New Revision: 826981

URL: http://svn.apache.org/viewvc?rev=826981&view=rev
Log:
Call destroy if there's an exception while running an injector to fix CAA test JCA_4003

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

Modified: tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/context/ReflectiveInstanceFactory.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/context/ReflectiveInstanceFactory.java?rev=826981&r1=826980&r2=826981&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/context/ReflectiveInstanceFactory.java
(original)
+++ tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/context/ReflectiveInstanceFactory.java
Tue Oct 20 07:32:11 2009
@@ -77,7 +77,12 @@
             for (Injector<T> injector : injectors) {
                 //FIXME Injectors should never be null
                 if (injector != null)
-                    injector.inject(instance);
+                    try {
+                        injector.inject(instance);
+                    } catch (Exception e) {
+                        destroyInvoker.invokeEvent(instance);
+                        throw new ObjectCreationException("Exception invoking injector",
e);
+                    }
             }
         }
 



Mime
View raw message