tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmar...@apache.org
Subject svn commit: r400246 - in /incubator/tuscany/java/sca/core/src: main/java/org/apache/tuscany/core/context/scope/ test/java/org/apache/tuscany/core/mock/ test/java/org/apache/tuscany/core/mock/component/ test/java/org/apache/tuscany/core/system/context/
Date Sat, 06 May 2006 06:18:34 GMT
Author: jmarino
Date: Fri May  5 23:18:32 2006
New Revision: 400246

URL: http://svn.apache.org/viewcvs?rev=400246&view=rev
Log:
fix for TUSCANY-247

Modified:
    incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/context/scope/CompositeScopeContext.java
    incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/mock/MockFactory.java
    incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/mock/component/SourceImpl.java
    incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/CompositeNestingTestCase.java

Modified: incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/context/scope/CompositeScopeContext.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/context/scope/CompositeScopeContext.java?rev=400246&r1=400245&r2=400246&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/context/scope/CompositeScopeContext.java
(original)
+++ incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/context/scope/CompositeScopeContext.java
Fri May  5 23:18:32 2006
@@ -140,6 +140,7 @@
             moduleScopeStarted = true;
         } else if (event instanceof ModuleStop) {
             moduleScopeStarted = false;
+            publish(event);
         }
         // propagate events to child contexts
         for (CompositeContext context : contexts.values()) {

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/mock/MockFactory.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/mock/MockFactory.java?rev=400246&r1=400245&r2=400246&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/mock/MockFactory.java
(original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/mock/MockFactory.java
Fri May  5 23:18:32 2006
@@ -15,6 +15,7 @@
 
 import java.util.ArrayList;
 import java.util.List;
+import java.lang.reflect.Method;
 
 import org.apache.tuscany.common.monitor.impl.NullMonitorFactory;
 import org.apache.tuscany.core.builder.ContextFactoryBuilder;
@@ -25,6 +26,7 @@
 import org.apache.tuscany.core.config.processor.ProcessorUtils;
 import org.apache.tuscany.core.context.impl.CompositeContextImpl;
 import org.apache.tuscany.core.extension.config.ImplementationProcessor;
+import org.apache.tuscany.core.extension.config.extensibility.DestroyInvokerExtensibilityElement;
 import org.apache.tuscany.core.mock.component.ModuleScopeSystemComponent;
 import org.apache.tuscany.core.mock.component.ModuleScopeSystemComponentImpl;
 import org.apache.tuscany.core.mock.component.Source;
@@ -41,6 +43,7 @@
 import org.apache.tuscany.core.system.builder.SystemEntryPointBuilder;
 import org.apache.tuscany.core.system.builder.SystemExternalServiceBuilder;
 import org.apache.tuscany.core.system.context.SystemCompositeContextImpl;
+import org.apache.tuscany.core.injection.MethodEventInvoker;
 import org.apache.tuscany.model.assembly.AssemblyContext;
 import org.apache.tuscany.model.assembly.Component;
 import org.apache.tuscany.model.assembly.ComponentInfo;

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/mock/component/SourceImpl.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/mock/component/SourceImpl.java?rev=400246&r1=400245&r2=400246&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/mock/component/SourceImpl.java
(original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/mock/component/SourceImpl.java
Fri May  5 23:18:32 2006
@@ -15,6 +15,8 @@
 
 import java.util.List;
 
+import org.osoa.sca.annotations.Destroy;
+
 /**
  * Mock system component implementation used in wiring tests
  * 
@@ -23,11 +25,15 @@
 public class SourceImpl implements Source {
 
     private Target target;
-    
+
     private List<Target> targets;
 
     private List<Target> targetsThroughField;
 
+    @Destroy
+    public void foo(){
+    }
+
     public void setTarget(Target target) {
         this.target = target;
     }
@@ -49,7 +55,7 @@
     }
 
     private Target[] targetsArray;
-    
+
     public Target[] getArrayOfTargets() {
         return targetsArray;
     }

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/CompositeNestingTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/CompositeNestingTestCase.java?rev=400246&r1=400245&r2=400246&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/CompositeNestingTestCase.java
(original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/CompositeNestingTestCase.java
Fri May  5 23:18:32 2006
@@ -17,6 +17,7 @@
 import junit.framework.TestCase;
 import org.apache.tuscany.core.context.CompositeContext;
 import org.apache.tuscany.core.context.event.ModuleStart;
+import org.apache.tuscany.core.context.event.ModuleStop;
 import org.apache.tuscany.core.mock.MockFactory;
 import org.apache.tuscany.core.mock.component.Source;
 import org.apache.tuscany.core.mock.component.Target;
@@ -76,6 +77,7 @@
         analyzeLeafComponents(child3Ctx);
         
         Assert.assertNull(child1Ctx.getContext("child3")); // sanity check
+        child1Ctx.publish(new ModuleStop(this));
     }
 
     private ModuleComponent createHierarchy() throws ConfigurationLoadException {



Mime
View raw message