You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2009/10/20 09:32:11 UTC
svn commit: r826981 -
/tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/context/ReflectiveInstanceFactory.java
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);
+ }
}
}