tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmar...@apache.org
Subject svn commit: r392146 [3/4] - in /incubator/tuscany/java/sca: bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/handler/ bindings/binding.jsonrpc/src/main/java/org/apache/tuscany/binding/jsonrpc/handler/ containers/container.java/src/...
Date Fri, 07 Apr 2006 01:11:38 GMT
Modified: incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/builder/SystemContextFactoryBuilder.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/builder/SystemContextFactoryBuilder.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/builder/SystemContextFactoryBuilder.java (original)
+++ incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/builder/SystemContextFactoryBuilder.java Thu Apr  6 18:11:28 2006
@@ -13,21 +13,9 @@
  */
 package org.apache.tuscany.core.system.builder;
 
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
+import commonj.sdo.DataObject;
 import org.apache.tuscany.common.monitor.MonitorFactory;
-import org.apache.tuscany.core.builder.BuilderConfigException;
-import org.apache.tuscany.core.builder.BuilderException;
-import org.apache.tuscany.core.builder.ContextFactoryBuilder;
-import org.apache.tuscany.core.builder.ContextResolver;
-import org.apache.tuscany.core.builder.NoAccessorException;
-import org.apache.tuscany.core.builder.ObjectFactory;
-import org.apache.tuscany.core.builder.UnknownTypeException;
+import org.apache.tuscany.core.builder.*;
 import org.apache.tuscany.core.builder.impl.ArrayMultiplicityObjectFactory;
 import org.apache.tuscany.core.builder.impl.ListMultiplicityObjectFactory;
 import org.apache.tuscany.core.config.JavaIntrospectionHelper;
@@ -36,16 +24,7 @@
 import org.apache.tuscany.core.context.ConfigurationContext;
 import org.apache.tuscany.core.context.SystemAggregateContext;
 import org.apache.tuscany.core.context.impl.AggregateContextImpl;
-import org.apache.tuscany.core.injection.ContextObjectFactory;
-import org.apache.tuscany.core.injection.EventInvoker;
-import org.apache.tuscany.core.injection.FactoryInitException;
-import org.apache.tuscany.core.injection.FieldInjector;
-import org.apache.tuscany.core.injection.Injector;
-import org.apache.tuscany.core.injection.MethodEventInvoker;
-import org.apache.tuscany.core.injection.MethodInjector;
-import org.apache.tuscany.core.injection.NonProxiedTargetFactory;
-import org.apache.tuscany.core.injection.SDOObjectFactory;
-import org.apache.tuscany.core.injection.SingletonObjectFactory;
+import org.apache.tuscany.core.injection.*;
 import org.apache.tuscany.core.runtime.RuntimeContext;
 import org.apache.tuscany.core.system.annotation.Autowire;
 import org.apache.tuscany.core.system.annotation.ParentContext;
@@ -54,22 +33,18 @@
 import org.apache.tuscany.core.system.config.SystemContextFactory;
 import org.apache.tuscany.core.system.context.SystemAggregateContextImpl;
 import org.apache.tuscany.core.system.injection.AutowireObjectFactory;
-import org.apache.tuscany.model.assembly.AssemblyModelObject;
-import org.apache.tuscany.model.assembly.Component;
-import org.apache.tuscany.model.assembly.ComponentImplementation;
-import org.apache.tuscany.model.assembly.ConfiguredProperty;
-import org.apache.tuscany.model.assembly.ConfiguredReference;
-import org.apache.tuscany.model.assembly.ConfiguredService;
-import org.apache.tuscany.model.assembly.Module;
-import org.apache.tuscany.model.assembly.Multiplicity;
-import org.apache.tuscany.model.assembly.Scope;
-import org.apache.tuscany.model.assembly.Service;
+import org.apache.tuscany.model.assembly.*;
 import org.osoa.sca.annotations.ComponentName;
 import org.osoa.sca.annotations.Context;
 import org.osoa.sca.annotations.Destroy;
 import org.osoa.sca.annotations.Init;
 
-import commonj.sdo.DataObject;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 /**
  * Decorates components whose implementation type is a

Modified: incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/config/SystemContextFactory.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/config/SystemContextFactory.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/config/SystemContextFactory.java (original)
+++ incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/config/SystemContextFactory.java Thu Apr  6 18:11:28 2006
@@ -1,9 +1,5 @@
 package org.apache.tuscany.core.system.config;
 
-import java.lang.reflect.Constructor;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.tuscany.common.TuscanyRuntimeException;
 import org.apache.tuscany.core.builder.ContextCreationException;
 import org.apache.tuscany.core.builder.ContextFactory;
@@ -18,6 +14,10 @@
 import org.apache.tuscany.core.system.context.SystemComponentContext;
 import org.apache.tuscany.model.assembly.Module;
 import org.apache.tuscany.model.assembly.Scope;
+
+import java.lang.reflect.Constructor;
+import java.util.List;
+import java.util.Map;
 
 /**
  * A <code>ContextFactory</code> that handles system component implementation types, which may be either simple, leaf

Modified: incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/config/SystemEntryPointContextFactory.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/config/SystemEntryPointContextFactory.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/config/SystemEntryPointContextFactory.java (original)
+++ incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/config/SystemEntryPointContextFactory.java Thu Apr  6 18:11:28 2006
@@ -13,17 +13,17 @@
  */
 package org.apache.tuscany.core.system.config;
 
-import java.util.List;
-import java.util.Map;
-
 import org.apache.tuscany.core.builder.ContextCreationException;
-import org.apache.tuscany.core.builder.ContextResolver;
 import org.apache.tuscany.core.builder.ContextFactory;
+import org.apache.tuscany.core.builder.ContextResolver;
 import org.apache.tuscany.core.context.AggregateContext;
 import org.apache.tuscany.core.context.EntryPointContext;
 import org.apache.tuscany.core.invocation.spi.ProxyFactory;
 import org.apache.tuscany.core.system.context.SystemEntryPointContext;
 import org.apache.tuscany.model.assembly.Scope;
+
+import java.util.List;
+import java.util.Map;
 
 /**
  * Creates {@link SystemEntryPointContext} instances based on an entry point configuration in an assembly model

Modified: incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/config/SystemExternalServiceContextFactory.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/config/SystemExternalServiceContextFactory.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/config/SystemExternalServiceContextFactory.java (original)
+++ incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/config/SystemExternalServiceContextFactory.java Thu Apr  6 18:11:28 2006
@@ -13,9 +13,6 @@
  */
 package org.apache.tuscany.core.system.config;
 
-import java.util.List;
-import java.util.Map;
-
 import org.apache.tuscany.core.builder.ContextCreationException;
 import org.apache.tuscany.core.builder.ContextFactory;
 import org.apache.tuscany.core.builder.ContextResolver;
@@ -27,6 +24,9 @@
 import org.apache.tuscany.core.system.context.SystemExternalServiceContext;
 import org.apache.tuscany.core.system.injection.AutowireObjectFactory;
 import org.apache.tuscany.model.assembly.Scope;
+
+import java.util.List;
+import java.util.Map;
 
 /**
  * Creates system type external service contexts

Modified: incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/config/SystemObjectContextFactory.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/config/SystemObjectContextFactory.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/config/SystemObjectContextFactory.java (original)
+++ incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/config/SystemObjectContextFactory.java Thu Apr  6 18:11:28 2006
@@ -17,18 +17,18 @@
  */
 package org.apache.tuscany.core.system.config;
 
-import java.util.List;
-import java.util.Map;
-
 import org.apache.tuscany.core.builder.ContextCreationException;
-import org.apache.tuscany.core.builder.ObjectFactory;
 import org.apache.tuscany.core.builder.ContextFactory;
+import org.apache.tuscany.core.builder.ObjectFactory;
 import org.apache.tuscany.core.context.AggregateContext;
 import org.apache.tuscany.core.context.Context;
 import org.apache.tuscany.core.injection.SingletonObjectFactory;
 import org.apache.tuscany.core.invocation.spi.ProxyFactory;
 import org.apache.tuscany.core.system.context.SystemComponentContext;
 import org.apache.tuscany.model.assembly.Scope;
+
+import java.util.List;
+import java.util.Map;
 
 /**
  * A ContextFactory that contains the configuration needed to convert a simple

Modified: incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/context/SystemAggregateContextImpl.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/context/SystemAggregateContextImpl.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/context/SystemAggregateContextImpl.java (original)
+++ incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/context/SystemAggregateContextImpl.java Thu Apr  6 18:11:28 2006
@@ -16,44 +16,13 @@
  */
 package org.apache.tuscany.core.system.context;
 
-import static org.apache.tuscany.core.context.EventContext.HTTP_SESSION;
-import static org.apache.tuscany.core.context.EventContext.REQUEST_END;
-import static org.apache.tuscany.core.context.EventContext.SESSION_NOTIFY;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
 import org.apache.tuscany.common.TuscanyRuntimeException;
 import org.apache.tuscany.common.monitor.MonitorFactory;
 import org.apache.tuscany.core.builder.BuilderConfigException;
 import org.apache.tuscany.core.builder.ContextFactory;
 import org.apache.tuscany.core.config.ConfigurationException;
-import org.apache.tuscany.core.context.AbstractContext;
-import org.apache.tuscany.core.context.AggregateContext;
-import org.apache.tuscany.core.context.AutowireContext;
-import org.apache.tuscany.core.context.AutowireResolutionException;
-import org.apache.tuscany.core.context.ConfigurationContext;
-import org.apache.tuscany.core.context.ContextInitException;
-import org.apache.tuscany.core.context.CoreRuntimeException;
-import org.apache.tuscany.core.context.DuplicateNameException;
-import org.apache.tuscany.core.context.EntryPointContext;
-import org.apache.tuscany.core.context.EventContext;
-import org.apache.tuscany.core.context.EventException;
-import org.apache.tuscany.core.context.InstanceContext;
-import org.apache.tuscany.core.context.LifecycleEventListener;
-import org.apache.tuscany.core.context.QualifiedName;
-import org.apache.tuscany.core.context.RuntimeEventListener;
-import org.apache.tuscany.core.context.ScopeContext;
-import org.apache.tuscany.core.context.ScopeStrategy;
-import org.apache.tuscany.core.context.SystemAggregateContext;
-import org.apache.tuscany.core.context.TargetException;
+import org.apache.tuscany.core.context.*;
+import static org.apache.tuscany.core.context.EventContext.*;
 import org.apache.tuscany.core.context.impl.EventContextImpl;
 import org.apache.tuscany.core.invocation.jdk.JDKProxyFactoryFactory;
 import org.apache.tuscany.core.invocation.spi.ProxyFactory;
@@ -67,20 +36,15 @@
 import org.apache.tuscany.core.system.assembly.SystemAssemblyFactory;
 import org.apache.tuscany.core.system.assembly.SystemBinding;
 import org.apache.tuscany.core.system.config.SystemObjectContextFactory;
-import org.apache.tuscany.model.assembly.Aggregate;
-import org.apache.tuscany.model.assembly.AggregatePart;
-import org.apache.tuscany.model.assembly.AssemblyModelObject;
-import org.apache.tuscany.model.assembly.Binding;
-import org.apache.tuscany.model.assembly.Component;
-import org.apache.tuscany.model.assembly.EntryPoint;
-import org.apache.tuscany.model.assembly.Extensible;
-import org.apache.tuscany.model.assembly.ExternalService;
-import org.apache.tuscany.model.assembly.Module;
-import org.apache.tuscany.model.assembly.ModuleComponent;
-import org.apache.tuscany.model.assembly.Scope;
-import org.apache.tuscany.model.assembly.Service;
+import org.apache.tuscany.model.assembly.*;
 import org.apache.tuscany.model.assembly.impl.AssemblyFactoryImpl;
 
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
 /**
  * Implements an aggregate context for system components. By default a system context uses the scopes specified by
  * {@link org.apache.tuscany.core.system.context.SystemScopeStrategy}. In addition, it implements an autowire policy
@@ -485,34 +449,11 @@
         return ctx.getInstance(null);
     }
 
-    public Object locateInstance(String qualifiedName) throws TargetException {
-        checkInit();
-        QualifiedName qName = new QualifiedName(qualifiedName);
-        ScopeContext scope = scopeIndex.get(qName.getPartName());
-        if (scope == null) {
-            TargetException e = new TargetException("Component not found");
-            e.setIdentifier(qualifiedName);
-            e.addContextName(getName());
-            throw e;
-        }
-        InstanceContext ctx = scope.getContext(qName.getPartName());
-        try {
-            return ctx.getInstance(qName);
-        } catch (TargetException e) {
-            e.addContextName(getName());
-            throw e;
-        }
-    }
-
     public Map<Scope, ScopeContext> getScopeContexts() {
         initializeScopes();
         return immutableScopeContexts;
     }
 
-    // ----------------------------------
-    // Protected methods
-    // ----------------------------------
-
     /**
      * Blocks until the module context has been initialized
      */
@@ -644,10 +585,6 @@
             }
         }
     }
-
-    // ----------------------------------
-    // ConfigurationContext methods
-    // ----------------------------------
 
     public void configure(Extensible model) throws ConfigurationException {
         if (configurationContext != null) {

Modified: incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/context/SystemComponentContext.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/context/SystemComponentContext.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/context/SystemComponentContext.java (original)
+++ incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/context/SystemComponentContext.java Thu Apr  6 18:11:28 2006
@@ -17,13 +17,7 @@
 package org.apache.tuscany.core.system.context;
 
 import org.apache.tuscany.core.builder.ObjectFactory;
-import org.apache.tuscany.core.context.AbstractContext;
-import org.apache.tuscany.core.context.Context;
-import org.apache.tuscany.core.context.ContextInitException;
-import org.apache.tuscany.core.context.LifecycleEventListener;
-import org.apache.tuscany.core.context.QualifiedName;
-import org.apache.tuscany.core.context.SimpleComponentContext;
-import org.apache.tuscany.core.context.TargetException;
+import org.apache.tuscany.core.context.*;
 import org.apache.tuscany.core.injection.EventInvoker;
 import org.apache.tuscany.core.injection.ObjectCallbackException;
 import org.apache.tuscany.core.injection.ObjectCreationException;
@@ -93,7 +87,7 @@
     public void init() throws TargetException{
         getInstance(null);
     }
-    
+
     public synchronized Object getInstance(QualifiedName qName, boolean notify) throws TargetException {
         if (cachedTargetInstance != null) {
             return cachedTargetInstance; // already cached, just return

Modified: incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/context/SystemEntryPointContext.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/context/SystemEntryPointContext.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/context/SystemEntryPointContext.java (original)
+++ incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/context/SystemEntryPointContext.java Thu Apr  6 18:11:28 2006
@@ -14,12 +14,7 @@
 package org.apache.tuscany.core.system.context;
 
 import org.apache.tuscany.core.builder.ContextResolver;
-import org.apache.tuscany.core.context.AbstractContext;
-import org.apache.tuscany.core.context.CoreRuntimeException;
-import org.apache.tuscany.core.context.EntryPointContext;
-import org.apache.tuscany.core.context.InstanceContext;
-import org.apache.tuscany.core.context.QualifiedName;
-import org.apache.tuscany.core.context.TargetException;
+import org.apache.tuscany.core.context.*;
 
 /**
  * Manages an entry point into a system module. System entry points cache a direct (i.e. non-proxied) reference to a
@@ -68,7 +63,7 @@
         lifecycleState = STOPPED;
     }
 
-    public Object getImplementationInstance() throws TargetException {
+    public Object getHandler() throws TargetException {
         return getInstance(null);
     }
 

Modified: incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/context/SystemExternalServiceContext.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/context/SystemExternalServiceContext.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/context/SystemExternalServiceContext.java (original)
+++ incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/context/SystemExternalServiceContext.java Thu Apr  6 18:11:28 2006
@@ -60,7 +60,7 @@
         lifecycleState = STOPPED;
     }
 
-    public Object getImplementationInstance() throws TargetException {
+    public Object getHandler() throws TargetException {
         return this;
     }
 

Modified: incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/context/SystemScopeStrategy.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/context/SystemScopeStrategy.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/context/SystemScopeStrategy.java (original)
+++ incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/context/SystemScopeStrategy.java Thu Apr  6 18:11:28 2006
@@ -16,9 +16,6 @@
  */
 package org.apache.tuscany.core.system.context;
 
-import java.util.HashMap;
-import java.util.Map;
-
 import org.apache.tuscany.core.context.EventContext;
 import org.apache.tuscany.core.context.ScopeContext;
 import org.apache.tuscany.core.context.scope.AbstractScopeStrategy;
@@ -26,6 +23,9 @@
 import org.apache.tuscany.core.context.scope.ModuleScopeContext;
 import org.apache.tuscany.core.context.scope.StatelessScopeContext;
 import org.apache.tuscany.model.assembly.Scope;
+
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * Implements a {@link org.apache.tuscany.core.context.ScopeStrategy} for a system aggregate context with the following scopes:

Modified: incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/webapp/ContextBinder.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/webapp/ContextBinder.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/webapp/ContextBinder.java (original)
+++ incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/webapp/ContextBinder.java Thu Apr  6 18:11:28 2006
@@ -16,8 +16,8 @@
  */
 package org.apache.tuscany.core.webapp;
 
-import org.osoa.sca.SCA;
 import org.osoa.sca.ModuleContext;
+import org.osoa.sca.SCA;
 
 /**
  * @version $Rev$ $Date$

Modified: incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/webapp/LazyHTTPSessionId.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/webapp/LazyHTTPSessionId.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/webapp/LazyHTTPSessionId.java (original)
+++ incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/webapp/LazyHTTPSessionId.java Thu Apr  6 18:11:28 2006
@@ -16,9 +16,9 @@
  */
 package org.apache.tuscany.core.webapp;
 
-import javax.servlet.http.HttpServletRequest;
-
 import org.apache.tuscany.core.context.ScopeIdentifier;
+
+import javax.servlet.http.HttpServletRequest;
 
 /**
  * Implements a <code>ScopeIdentifier</code> for a Servlet-based transport.

Modified: incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/webapp/TuscanyRequestFilter.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/webapp/TuscanyRequestFilter.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/webapp/TuscanyRequestFilter.java (original)
+++ incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/webapp/TuscanyRequestFilter.java Thu Apr  6 18:11:28 2006
@@ -16,22 +16,14 @@
  */
 package org.apache.tuscany.core.webapp;
 
-import java.io.IOException;
-
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-
-import org.osoa.sca.ModuleContext;
-import org.osoa.sca.CurrentModuleContext;
-
 import org.apache.tuscany.core.context.AggregateContext;
 import org.apache.tuscany.core.context.EventContext;
+import org.osoa.sca.CurrentModuleContext;
+import org.osoa.sca.ModuleContext;
+
+import javax.servlet.*;
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
 
 /**
  * Notifies the {@link org.apache.tuscany.core.context.AggregateContext} of web request start and end events as well as setting up the

Modified: incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/webapp/TuscanyServletListener.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/webapp/TuscanyServletListener.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/webapp/TuscanyServletListener.java (original)
+++ incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/webapp/TuscanyServletListener.java Thu Apr  6 18:11:28 2006
@@ -16,20 +16,11 @@
  */
 package org.apache.tuscany.core.webapp;
 
-import java.util.List;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-import javax.servlet.http.HttpSessionEvent;
-import javax.servlet.http.HttpSessionListener;
-
-import org.osoa.sca.CurrentModuleContext;
-import org.osoa.sca.ModuleContext;
-
 import org.apache.tuscany.common.monitor.MonitorFactory;
 import org.apache.tuscany.common.monitor.impl.NullMonitorFactory;
 import org.apache.tuscany.core.builder.ContextFactoryBuilder;
 import org.apache.tuscany.core.builder.impl.DefaultWireBuilder;
+import org.apache.tuscany.core.client.BootstrapHelper;
 import org.apache.tuscany.core.config.ConfigurationException;
 import org.apache.tuscany.core.config.ModuleComponentConfigurationLoader;
 import org.apache.tuscany.core.context.AggregateContext;
@@ -37,10 +28,17 @@
 import org.apache.tuscany.core.context.SystemAggregateContext;
 import org.apache.tuscany.core.runtime.RuntimeContext;
 import org.apache.tuscany.core.runtime.RuntimeContextImpl;
-import org.apache.tuscany.core.client.BootstrapHelper;
 import org.apache.tuscany.model.assembly.AssemblyModelContext;
 import org.apache.tuscany.model.assembly.ModuleComponent;
-import org.apache.tuscany.model.scdl.loader.SCDLModelLoader;
+import org.osoa.sca.CurrentModuleContext;
+import org.osoa.sca.ModuleContext;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import javax.servlet.http.HttpSessionEvent;
+import javax.servlet.http.HttpSessionListener;
+import java.util.List;
 
 /**
  * ServletContextListener that can be added to a standard web application to boot

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/builder/impl/DefaultWireBuilderTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/builder/impl/DefaultWireBuilderTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/builder/impl/DefaultWireBuilderTestCase.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/builder/impl/DefaultWireBuilderTestCase.java Thu Apr  6 18:11:28 2006
@@ -1,26 +1,21 @@
 package org.apache.tuscany.core.builder.impl;
 
-import java.lang.reflect.Method;
-import java.util.Map;
-
 import junit.framework.Assert;
 import junit.framework.TestCase;
-
 import org.apache.tuscany.core.context.QualifiedName;
 import org.apache.tuscany.core.invocation.InvocationConfiguration;
 import org.apache.tuscany.core.invocation.MethodHashMap;
 import org.apache.tuscany.core.invocation.ProxyConfiguration;
 import org.apache.tuscany.core.invocation.impl.InvokerInterceptor;
 import org.apache.tuscany.core.invocation.jdk.JDKProxyFactory;
-import org.apache.tuscany.core.invocation.mock.MockHandler;
-import org.apache.tuscany.core.invocation.mock.MockStaticInvoker;
-import org.apache.tuscany.core.invocation.mock.MockSyncInterceptor;
-import org.apache.tuscany.core.invocation.mock.SimpleTarget;
-import org.apache.tuscany.core.invocation.mock.SimpleTargetImpl;
+import org.apache.tuscany.core.invocation.mock.*;
 import org.apache.tuscany.core.invocation.spi.ProxyFactory;
 import org.apache.tuscany.core.message.Message;
 import org.apache.tuscany.core.message.MessageFactory;
 import org.apache.tuscany.core.message.impl.MessageFactoryImpl;
+
+import java.lang.reflect.Method;
+import java.util.Map;
 
 public class DefaultWireBuilderTestCase extends TestCase {
 

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/builder/impl/NegativeDefaultWireBuilderTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/builder/impl/NegativeDefaultWireBuilderTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/builder/impl/NegativeDefaultWireBuilderTestCase.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/builder/impl/NegativeDefaultWireBuilderTestCase.java Thu Apr  6 18:11:28 2006
@@ -1,10 +1,6 @@
 package org.apache.tuscany.core.builder.impl;
 
-import java.lang.reflect.Method;
-import java.util.Map;
-
 import junit.framework.TestCase;
-
 import org.apache.tuscany.core.builder.BuilderConfigException;
 import org.apache.tuscany.core.context.QualifiedName;
 import org.apache.tuscany.core.invocation.InvocationConfiguration;
@@ -15,6 +11,9 @@
 import org.apache.tuscany.core.invocation.spi.ProxyFactory;
 import org.apache.tuscany.core.message.MessageFactory;
 import org.apache.tuscany.core.message.impl.MessageFactoryImpl;
+
+import java.lang.reflect.Method;
+import java.util.Map;
 
 public class NegativeDefaultWireBuilderTestCase extends TestCase {
 

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/config/Bean2.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/config/Bean2.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/config/Bean2.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/config/Bean2.java Thu Apr  6 18:11:28 2006
@@ -1,8 +1,8 @@
 package org.apache.tuscany.core.config;
 
-import java.util.List;
-
 import junit.framework.AssertionFailedError;
+
+import java.util.List;
 
 public class Bean2 {
 

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/config/JavaIntrospectionHelperTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/config/JavaIntrospectionHelperTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/config/JavaIntrospectionHelperTestCase.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/config/JavaIntrospectionHelperTestCase.java Thu Apr  6 18:11:28 2006
@@ -1,16 +1,15 @@
 package org.apache.tuscany.core.config;
 
+import junit.framework.Assert;
+import junit.framework.TestCase;
+import org.apache.tuscany.core.mock.component.Target;
+
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-
-import org.apache.tuscany.core.mock.component.Target;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
 
 public class JavaIntrospectionHelperTestCase extends TestCase {
 

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/context/AbstractAggregateHierarchyTests.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/context/AbstractAggregateHierarchyTests.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/context/AbstractAggregateHierarchyTests.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/context/AbstractAggregateHierarchyTests.java Thu Apr  6 18:11:28 2006
@@ -13,11 +13,8 @@
  */
 package org.apache.tuscany.core.context;
 
-import java.util.List;
-
 import junit.framework.Assert;
 import junit.framework.TestCase;
-
 import org.apache.tuscany.common.monitor.impl.NullMonitorFactory;
 import org.apache.tuscany.core.builder.ContextFactoryBuilder;
 import org.apache.tuscany.core.context.impl.AggregateContextImpl;
@@ -34,6 +31,8 @@
 import org.apache.tuscany.model.assembly.Scope;
 import org.osoa.sca.ModuleContext;
 
+import java.util.List;
+
 /**
  * Performs testing of various hierarchical scenarios
  * 
@@ -52,7 +51,7 @@
         parent.registerModelObject(ep);
         parent.fireEvent(EventContext.MODULE_START, null);
         child.fireEvent(EventContext.MODULE_START, null);
-        Assert.assertNotNull(parent.locateInstance("TestService1EP"));
+        Assert.assertNotNull(parent.getContext("TestService1EP").getInstance(null));
         try {
             ((ModuleContext) child).locateService("TestService1EP");
             fail("Expexcted " + ServiceNotFoundException.class.getName());

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/context/AggregateComponentContextRegisterTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/context/AggregateComponentContextRegisterTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/context/AggregateComponentContextRegisterTestCase.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/context/AggregateComponentContextRegisterTestCase.java Thu Apr  6 18:11:28 2006
@@ -13,11 +13,8 @@
  */
 package org.apache.tuscany.core.context;
 
-import java.util.List;
-
 import junit.framework.Assert;
 import junit.framework.TestCase;
-
 import org.apache.tuscany.common.monitor.impl.NullMonitorFactory;
 import org.apache.tuscany.core.builder.ContextFactoryBuilder;
 import org.apache.tuscany.core.context.impl.AggregateContextImpl;
@@ -28,13 +25,15 @@
 import org.apache.tuscany.core.mock.component.GenericSystemComponent;
 import org.apache.tuscany.core.mock.component.ModuleScopeSystemComponent;
 import org.apache.tuscany.core.mock.component.ModuleScopeSystemComponentImpl;
-import org.apache.tuscany.core.system.assembly.impl.SystemAssemblyFactoryImpl;
 import org.apache.tuscany.core.system.assembly.SystemAssemblyFactory;
+import org.apache.tuscany.core.system.assembly.impl.SystemAssemblyFactoryImpl;
 import org.apache.tuscany.model.assembly.Component;
 import org.apache.tuscany.model.assembly.EntryPoint;
 import org.apache.tuscany.model.assembly.Module;
 import org.apache.tuscany.model.assembly.Scope;
 
+import java.util.List;
+
 /**
  * Tests registration of model objects for an aggregate context
  * 
@@ -49,9 +48,9 @@
         moduleContext.registerModelObject(module);
         moduleContext.start();
         moduleContext.fireEvent(EventContext.MODULE_START, null);
-        GenericSystemComponent component = (GenericSystemComponent) moduleContext.locateInstance("TestService1");
+        GenericSystemComponent component = (GenericSystemComponent) moduleContext.getContext("TestService1").getInstance(null);
         Assert.assertNotNull(component);
-        GenericSystemComponent ep = (GenericSystemComponent) moduleContext.locateInstance("TestService1EP");
+        GenericSystemComponent ep = (GenericSystemComponent) moduleContext.getContext("TestService1EP").getInstance(null);
         Assert.assertNotNull(ep);
         moduleContext.fireEvent(EventContext.MODULE_STOP, null);
         moduleContext.stop();
@@ -63,9 +62,9 @@
         Module module = MockFactory.createSystemModule();
         moduleContext.registerModelObject(module);
         moduleContext.fireEvent(EventContext.MODULE_START, null);
-        GenericSystemComponent component = (GenericSystemComponent) moduleContext.locateInstance("TestService1");
+        GenericSystemComponent component = (GenericSystemComponent) moduleContext.getContext("TestService1").getInstance(null);
         Assert.assertNotNull(component);
-        GenericSystemComponent ep = (GenericSystemComponent) moduleContext.locateInstance("TestService1EP");
+        GenericSystemComponent ep = (GenericSystemComponent) moduleContext.getContext("TestService1EP").getInstance(null);
         Assert.assertNotNull(ep);
         moduleContext.fireEvent(EventContext.MODULE_STOP, null);
         moduleContext.stop();
@@ -79,9 +78,9 @@
         moduleContext.registerModelObject(ep);
         moduleContext.start();
         moduleContext.fireEvent(EventContext.MODULE_START, null);
-        GenericSystemComponent test = (GenericSystemComponent) moduleContext.locateInstance("TestService1");
+        GenericSystemComponent test = (GenericSystemComponent) moduleContext.getContext("TestService1").getInstance(null);
         Assert.assertNotNull(test);
-        GenericSystemComponent testEP = (GenericSystemComponent) moduleContext.locateInstance("TestService1EP");
+        GenericSystemComponent testEP = (GenericSystemComponent) moduleContext.getContext("TestService1EP").getInstance(null);
         Assert.assertNotNull(testEP);
         moduleContext.fireEvent(EventContext.MODULE_STOP, null);
         moduleContext.stop();
@@ -95,9 +94,9 @@
         EntryPoint ep = MockFactory.createEPSystemBinding("TestService1EP", ModuleScopeSystemComponent.class, "TestService1", component);
         moduleContext.registerModelObject(ep);
         moduleContext.fireEvent(EventContext.MODULE_START, null);
-        GenericSystemComponent test = (GenericSystemComponent) moduleContext.locateInstance("TestService1");
+        GenericSystemComponent test = (GenericSystemComponent) moduleContext.getContext("TestService1").getInstance(null);
         Assert.assertNotNull(test);
-        GenericSystemComponent testEP = (GenericSystemComponent) moduleContext.locateInstance("TestService1EP");
+        GenericSystemComponent testEP = (GenericSystemComponent) moduleContext.getContext("TestService1EP").getInstance(null);
         Assert.assertNotNull(testEP);
         moduleContext.fireEvent(EventContext.MODULE_STOP, null);
         moduleContext.stop();
@@ -109,11 +108,11 @@
         moduleContext.start();
         moduleContext.registerModelObject(component);
         moduleContext.fireEvent(EventContext.MODULE_START, null);
-        GenericSystemComponent test = (GenericSystemComponent) moduleContext.locateInstance("TestService1");
+        GenericSystemComponent test = (GenericSystemComponent) moduleContext.getContext("TestService1").getInstance(null);
         Assert.assertNotNull(test);
         EntryPoint ep = MockFactory.createEPSystemBinding("TestService1EP", ModuleScopeSystemComponent.class, "TestService1", component);
         moduleContext.registerModelObject(ep);
-        GenericSystemComponent testEP = (GenericSystemComponent) moduleContext.locateInstance("TestService1EP");
+        GenericSystemComponent testEP = (GenericSystemComponent) moduleContext.getContext("TestService1EP").getInstance(null);
         Assert.assertNotNull(testEP);
         moduleContext.fireEvent(EventContext.MODULE_STOP, null);
         moduleContext.stop();

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/context/AggregateHierarchyTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/context/AggregateHierarchyTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/context/AggregateHierarchyTestCase.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/context/AggregateHierarchyTestCase.java Thu Apr  6 18:11:28 2006
@@ -13,10 +13,7 @@
  */
 package org.apache.tuscany.core.context;
 
-import java.util.List;
-
 import junit.framework.Assert;
-
 import org.apache.tuscany.common.monitor.impl.NullMonitorFactory;
 import org.apache.tuscany.core.builder.ContextFactoryBuilder;
 import org.apache.tuscany.core.context.impl.AggregateContextImpl;
@@ -30,10 +27,11 @@
 import org.apache.tuscany.model.assembly.EntryPoint;
 import org.apache.tuscany.model.assembly.Scope;
 import org.apache.tuscany.model.assembly.impl.AssemblyModelContextImpl;
-
 import org.osoa.sca.ModuleContext;
 import org.osoa.sca.ServiceUnavailableException;
 
+import java.util.List;
+
 /**
  * Performs testing of various hierarchical scenarios
  * 
@@ -54,7 +52,7 @@
         child.registerModelObject(component);
         parent.fireEvent(EventContext.MODULE_START, null);
         child.fireEvent(EventContext.MODULE_START, null);
-        Assert.assertNotNull(child.locateInstance("TestService1"));
+        Assert.assertNotNull(child.getContext("TestService1").getInstance(null));
         try {
             ((ModuleContext) parent).locateService("test.child/TestService1");
             fail("Expected " + ServiceUnavailableException.class.getName()
@@ -69,14 +67,14 @@
         EntryPoint ep = MockFactory.createEPSystemBinding("TestService1EP", ModuleScopeSystemComponent.class, "TestService1",
                 component);
         child.registerModelObject(ep);
-        Assert.assertNotNull(child.locateInstance("TestService1EP"));
-        Assert.assertNotNull(parent.locateInstance("test.child/TestService1EP"));
+        Assert.assertNotNull(child.getContext("TestService1EP").getInstance(null));
+        Assert.assertNotNull(parent.getContext("test.child").getInstance(new QualifiedName("./TestService1EP")));
 
         // now expose the child entry point from the parent context
         EntryPoint parentEp = MockFactory.createEntryPointWithStringRef("TestService1EP", ModuleScopeSystemComponent.class,
                 "TestService1", "test.child/TestService1EP");
         parent.registerModelObject(parentEp);
-        Assert.assertNotNull(parent.locateInstance("TestService1EP"));
+        Assert.assertNotNull(parent.getContext("TestService1EP").getInstance(null));
 
         parent.fireEvent(EventContext.MODULE_STOP, null);
         child.fireEvent(EventContext.MODULE_STOP, null);

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/context/scope/DefaultScopeStrategyTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/context/scope/DefaultScopeStrategyTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/context/scope/DefaultScopeStrategyTestCase.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/context/scope/DefaultScopeStrategyTestCase.java Thu Apr  6 18:11:28 2006
@@ -13,10 +13,9 @@
  */
 package org.apache.tuscany.core.context.scope;
 
-import org.apache.tuscany.model.assembly.Scope;
-
 import junit.framework.Assert;
 import junit.framework.TestCase;
+import org.apache.tuscany.model.assembly.Scope;
 
 /**
  * Basic scope strategy tests, including downscope referencing 

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/integration/IntraAggregateWireIntegrationTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/integration/IntraAggregateWireIntegrationTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/integration/IntraAggregateWireIntegrationTestCase.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/integration/IntraAggregateWireIntegrationTestCase.java Thu Apr  6 18:11:28 2006
@@ -15,7 +15,6 @@
 
 import junit.framework.Assert;
 import junit.framework.TestCase;
-
 import org.apache.tuscany.core.config.ConfigurationException;
 import org.apache.tuscany.core.context.AggregateContext;
 import org.apache.tuscany.core.context.EventContext;

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/InvocationConfigurationErrorTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/InvocationConfigurationErrorTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/InvocationConfigurationErrorTestCase.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/InvocationConfigurationErrorTestCase.java Thu Apr  6 18:11:28 2006
@@ -13,21 +13,16 @@
  */
 package org.apache.tuscany.core.invocation;
 
-import java.lang.reflect.Method;
-
 import junit.framework.Assert;
 import junit.framework.TestCase;
-
 import org.apache.tuscany.core.invocation.impl.InvokerInterceptor;
 import org.apache.tuscany.core.invocation.impl.MessageChannelImpl;
-import org.apache.tuscany.core.invocation.mock.MockHandler;
-import org.apache.tuscany.core.invocation.mock.MockStaticInvoker;
-import org.apache.tuscany.core.invocation.mock.MockSyncInterceptor;
-import org.apache.tuscany.core.invocation.mock.SimpleTarget;
-import org.apache.tuscany.core.invocation.mock.SimpleTargetImpl;
+import org.apache.tuscany.core.invocation.mock.*;
 import org.apache.tuscany.core.message.Message;
 import org.apache.tuscany.core.message.MessageFactory;
 import org.apache.tuscany.core.message.impl.MessageFactoryImpl;
+
+import java.lang.reflect.Method;
 
 /**
  * Tests error propagation through an innvocation

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/InvocationConfigurationTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/InvocationConfigurationTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/InvocationConfigurationTestCase.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/InvocationConfigurationTestCase.java Thu Apr  6 18:11:28 2006
@@ -13,21 +13,16 @@
  */
 package org.apache.tuscany.core.invocation;
 
-import java.lang.reflect.Method;
-
 import junit.framework.Assert;
 import junit.framework.TestCase;
-
 import org.apache.tuscany.core.invocation.impl.InvokerInterceptor;
 import org.apache.tuscany.core.invocation.impl.MessageChannelImpl;
-import org.apache.tuscany.core.invocation.mock.MockHandler;
-import org.apache.tuscany.core.invocation.mock.MockStaticInvoker;
-import org.apache.tuscany.core.invocation.mock.MockSyncInterceptor;
-import org.apache.tuscany.core.invocation.mock.SimpleTarget;
-import org.apache.tuscany.core.invocation.mock.SimpleTargetImpl;
+import org.apache.tuscany.core.invocation.mock.*;
 import org.apache.tuscany.core.message.Message;
 import org.apache.tuscany.core.message.MessageFactory;
 import org.apache.tuscany.core.message.impl.MessageFactoryImpl;
+
+import java.lang.reflect.Method;
 
 public class InvocationConfigurationTestCase extends TestCase {
 

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/InvocationErrorTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/InvocationErrorTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/InvocationErrorTestCase.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/InvocationErrorTestCase.java Thu Apr  6 18:11:28 2006
@@ -16,20 +16,19 @@
  */
 package org.apache.tuscany.core.invocation;
 
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.util.Map;
-
 import junit.framework.Assert;
 import junit.framework.TestCase;
-
 import org.apache.tuscany.core.invocation.impl.InvokerInterceptor;
 import org.apache.tuscany.core.invocation.jdk.JDKInvocationHandler;
 import org.apache.tuscany.core.invocation.mock.MockHandler;
 import org.apache.tuscany.core.invocation.mock.MockStaticInvoker;
 import org.apache.tuscany.core.invocation.mock.MockSyncInterceptor;
 import org.apache.tuscany.core.message.impl.MessageFactoryImpl;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.util.Map;
 
 /**
  * Tests handling of exceptions thrown during an invocation

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/jdk/JDKInvocationHandlerTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/jdk/JDKInvocationHandlerTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/jdk/JDKInvocationHandlerTestCase.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/jdk/JDKInvocationHandlerTestCase.java Thu Apr  6 18:11:28 2006
@@ -1,21 +1,16 @@
 package org.apache.tuscany.core.invocation.jdk;
 
-import java.lang.reflect.Method;
-import java.util.Map;
-
 import junit.framework.Assert;
 import junit.framework.TestCase;
-
 import org.apache.tuscany.core.invocation.InvocationConfiguration;
 import org.apache.tuscany.core.invocation.MethodHashMap;
 import org.apache.tuscany.core.invocation.impl.InvokerInterceptor;
 import org.apache.tuscany.core.invocation.impl.MessageChannelImpl;
-import org.apache.tuscany.core.invocation.mock.MockHandler;
-import org.apache.tuscany.core.invocation.mock.MockStaticInvoker;
-import org.apache.tuscany.core.invocation.mock.MockSyncInterceptor;
-import org.apache.tuscany.core.invocation.mock.SimpleTarget;
-import org.apache.tuscany.core.invocation.mock.SimpleTargetImpl;
+import org.apache.tuscany.core.invocation.mock.*;
 import org.apache.tuscany.core.message.impl.MessageFactoryImpl;
+
+import java.lang.reflect.Method;
+import java.util.Map;
 
 public class JDKInvocationHandlerTestCase extends TestCase {
 

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/jdk/JDKProxyFactoryTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/jdk/JDKProxyFactoryTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/jdk/JDKProxyFactoryTestCase.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/jdk/JDKProxyFactoryTestCase.java Thu Apr  6 18:11:28 2006
@@ -13,12 +13,8 @@
  */
 package org.apache.tuscany.core.invocation.jdk;
 
-import java.lang.reflect.Method;
-import java.util.Map;
-
 import junit.framework.Assert;
 import junit.framework.TestCase;
-
 import org.apache.tuscany.core.context.QualifiedName;
 import org.apache.tuscany.core.invocation.InvocationConfiguration;
 import org.apache.tuscany.core.invocation.MethodHashMap;
@@ -29,6 +25,9 @@
 import org.apache.tuscany.core.invocation.mock.SimpleTarget;
 import org.apache.tuscany.core.invocation.mock.SimpleTargetImpl;
 import org.apache.tuscany.core.message.impl.MessageFactoryImpl;
+
+import java.lang.reflect.Method;
+import java.util.Map;
 
 public class JDKProxyFactoryTestCase extends TestCase {
 

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/mock/MockScopeContext.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/mock/MockScopeContext.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/mock/MockScopeContext.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/mock/MockScopeContext.java Thu Apr  6 18:11:28 2006
@@ -16,20 +16,13 @@
  */
 package org.apache.tuscany.core.invocation.mock;
 
+import org.apache.tuscany.core.builder.ContextFactory;
+import org.apache.tuscany.core.context.*;
+import org.apache.tuscany.model.assembly.SimpleComponent;
+
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-
-import org.apache.tuscany.core.builder.ContextFactory;
-import org.apache.tuscany.core.context.InstanceContext;
-import org.apache.tuscany.core.context.EventException;
-import org.apache.tuscany.core.context.QualifiedName;
-import org.apache.tuscany.core.context.LifecycleEventListener;
-import org.apache.tuscany.core.context.ScopeContext;
-import org.apache.tuscany.core.context.ScopeRuntimeException;
-import org.apache.tuscany.core.context.SimpleComponentContext;
-import org.apache.tuscany.core.context.TargetException;
-import org.apache.tuscany.model.assembly.SimpleComponent;
 
 public class MockScopeContext implements ScopeContext {
 

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/mock/MockStaticInvoker.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/mock/MockStaticInvoker.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/mock/MockStaticInvoker.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/invocation/mock/MockStaticInvoker.java Thu Apr  6 18:11:28 2006
@@ -1,12 +1,12 @@
 package org.apache.tuscany.core.invocation.mock;
 
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
 import org.apache.tuscany.core.invocation.Interceptor;
 import org.apache.tuscany.core.invocation.InvocationRuntimeException;
 import org.apache.tuscany.core.invocation.TargetInvoker;
 import org.apache.tuscany.core.message.Message;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
 
 /**
  * Caches component instances that do not need to be resolved for every invocation, e.g. an invocation originating from

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/loader/ComponentTypeLoaderTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/loader/ComponentTypeLoaderTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/loader/ComponentTypeLoaderTestCase.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/loader/ComponentTypeLoaderTestCase.java Thu Apr  6 18:11:28 2006
@@ -16,13 +16,7 @@
  */
 package org.apache.tuscany.core.loader;
 
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
 import junit.framework.TestCase;
-
 import org.apache.tuscany.common.resource.impl.ResourceLoaderImpl;
 import org.apache.tuscany.core.config.ConfigurationLoadException;
 import org.apache.tuscany.core.loader.assembly.AbstractLoader;
@@ -32,6 +26,11 @@
 import org.apache.tuscany.core.system.assembly.impl.SystemAssemblyFactoryImpl;
 import org.apache.tuscany.model.assembly.ComponentType;
 import org.apache.tuscany.model.assembly.Service;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
 
 /**
  * @version $Rev$ $Date$

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/loader/StringParserPropertyFactoryTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/loader/StringParserPropertyFactoryTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/loader/StringParserPropertyFactoryTestCase.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/loader/StringParserPropertyFactoryTestCase.java Thu Apr  6 18:11:28 2006
@@ -16,23 +16,22 @@
  */
 package org.apache.tuscany.core.loader;
 
-import java.io.StringReader;
-import java.net.URI;
-import java.util.Arrays;
-import java.beans.PropertyEditorManager;
-import java.beans.PropertyEditorSupport;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
 import junit.framework.TestCase;
-
 import org.apache.tuscany.core.builder.ObjectFactory;
 import org.apache.tuscany.core.config.ConfigurationLoadException;
 import org.apache.tuscany.core.loader.impl.StringParserPropertyFactory;
 import org.apache.tuscany.model.assembly.AssemblyFactory;
 import org.apache.tuscany.model.assembly.Property;
 import org.apache.tuscany.model.assembly.impl.AssemblyFactoryImpl;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import java.beans.PropertyEditorManager;
+import java.beans.PropertyEditorSupport;
+import java.io.StringReader;
+import java.net.URI;
+import java.util.Arrays;
 
 /**
  * @version $Rev$ $Date$

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/loader/assembly/ComponentLoaderTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/loader/assembly/ComponentLoaderTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/loader/assembly/ComponentLoaderTestCase.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/loader/assembly/ComponentLoaderTestCase.java Thu Apr  6 18:11:28 2006
@@ -16,30 +16,29 @@
  */
 package org.apache.tuscany.core.loader.assembly;
 
-import java.io.StringReader;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
 import junit.framework.TestCase;
-
 import org.apache.tuscany.common.resource.ResourceLoader;
 import org.apache.tuscany.common.resource.impl.ResourceLoaderImpl;
-import org.apache.tuscany.core.config.ConfigurationLoadException;
+import org.apache.tuscany.core.builder.ObjectFactory;
 import org.apache.tuscany.core.config.ComponentTypeIntrospector;
 import org.apache.tuscany.core.config.ConfigurationException;
+import org.apache.tuscany.core.config.ConfigurationLoadException;
 import org.apache.tuscany.core.config.impl.Java5ComponentTypeIntrospector;
+import org.apache.tuscany.core.injection.SingletonObjectFactory;
+import org.apache.tuscany.core.loader.StAXPropertyFactory;
 import org.apache.tuscany.core.system.assembly.SystemAssemblyFactory;
 import org.apache.tuscany.core.system.assembly.SystemImplementation;
 import org.apache.tuscany.core.system.assembly.impl.SystemAssemblyFactoryImpl;
-import org.apache.tuscany.core.loader.StAXPropertyFactory;
-import org.apache.tuscany.core.builder.ObjectFactory;
-import org.apache.tuscany.core.injection.SingletonObjectFactory;
 import org.apache.tuscany.model.assembly.AssemblyModelContext;
 import org.apache.tuscany.model.assembly.Component;
 import org.apache.tuscany.model.assembly.ConfiguredProperty;
 import org.apache.tuscany.model.assembly.Property;
 import org.apache.tuscany.model.assembly.impl.AssemblyModelContextImpl;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import java.io.StringReader;
 
 /**
  * @version $Rev$ $Date$

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/mock/MockConfigContext.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/mock/MockConfigContext.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/mock/MockConfigContext.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/mock/MockConfigContext.java Thu Apr  6 18:11:28 2006
@@ -13,9 +13,6 @@
  */
 package org.apache.tuscany.core.mock;
 
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.tuscany.core.builder.BuilderConfigException;
 import org.apache.tuscany.core.builder.ContextFactoryBuilder;
 import org.apache.tuscany.core.builder.impl.AssemblyVisitor;
@@ -25,6 +22,9 @@
 import org.apache.tuscany.core.invocation.spi.ProxyFactory;
 import org.apache.tuscany.model.assembly.AssemblyModelObject;
 import org.apache.tuscany.model.assembly.Extensible;
+
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * A mock configuration context

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=392146&r1=392145&r2=392146&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 Thu Apr  6 18:11:28 2006
@@ -13,17 +13,8 @@
  */
 package org.apache.tuscany.core.mock;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.tuscany.core.builder.ContextFactoryBuilder;
-import org.apache.tuscany.core.mock.component.ModuleScopeSystemComponent;
-import org.apache.tuscany.core.mock.component.ModuleScopeSystemComponentImpl;
-import org.apache.tuscany.core.mock.component.Source;
-import org.apache.tuscany.core.mock.component.SourceImpl;
-import org.apache.tuscany.core.mock.component.Target;
-import org.apache.tuscany.core.mock.component.TargetImpl;
+import org.apache.tuscany.core.mock.component.*;
 import org.apache.tuscany.core.runtime.RuntimeContext;
 import org.apache.tuscany.core.runtime.RuntimeContextImpl;
 import org.apache.tuscany.core.system.assembly.SystemAssemblyFactory;
@@ -33,22 +24,13 @@
 import org.apache.tuscany.core.system.builder.SystemContextFactoryBuilder;
 import org.apache.tuscany.core.system.builder.SystemEntryPointBuilder;
 import org.apache.tuscany.core.system.builder.SystemExternalServiceBuilder;
-import org.apache.tuscany.model.assembly.AggregatePart;
-import org.apache.tuscany.model.assembly.AssemblyModelContext;
-import org.apache.tuscany.model.assembly.Component;
-import org.apache.tuscany.model.assembly.ComponentType;
-import org.apache.tuscany.model.assembly.ConfiguredReference;
-import org.apache.tuscany.model.assembly.ConfiguredService;
-import org.apache.tuscany.model.assembly.EntryPoint;
-import org.apache.tuscany.model.assembly.ExternalService;
-import org.apache.tuscany.model.assembly.Module;
-import org.apache.tuscany.model.assembly.ModuleComponent;
-import org.apache.tuscany.model.assembly.Multiplicity;
-import org.apache.tuscany.model.assembly.Reference;
-import org.apache.tuscany.model.assembly.Scope;
-import org.apache.tuscany.model.assembly.Service;
+import org.apache.tuscany.model.assembly.*;
 import org.apache.tuscany.model.assembly.impl.AssemblyModelContextImpl;
 import org.apache.tuscany.model.types.java.JavaServiceContract;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
 
 /**
  * Generates test components, modules, and runtime artifacts

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/mock/component/AutowireSourceImpl.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/mock/component/AutowireSourceImpl.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/mock/component/AutowireSourceImpl.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/mock/component/AutowireSourceImpl.java Thu Apr  6 18:11:28 2006
@@ -13,9 +13,9 @@
  */
 package org.apache.tuscany.core.mock.component;
 
-import java.util.List;
-
 import org.apache.tuscany.core.system.annotation.Autowire;
+
+import java.util.List;
 
 /**
  * Mock system component implementation used in autowire tests

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/runtime/RuntimeBootTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/runtime/RuntimeBootTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/runtime/RuntimeBootTestCase.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/runtime/RuntimeBootTestCase.java Thu Apr  6 18:11:28 2006
@@ -13,17 +13,16 @@
  */
 package org.apache.tuscany.core.runtime;
 
-import java.util.List;
-
 import junit.framework.Assert;
 import junit.framework.TestCase;
-
 import org.apache.tuscany.common.monitor.impl.NullMonitorFactory;
 import org.apache.tuscany.core.builder.ContextFactoryBuilder;
 import org.apache.tuscany.core.context.AggregateContext;
 import org.apache.tuscany.core.context.Context;
 import org.apache.tuscany.core.context.EventContext;
 import org.apache.tuscany.core.mock.MockFactory;
+
+import java.util.List;
 
 /**
  * Tests runtime boot scenarios

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/runtime/RuntimeContextImplTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/runtime/RuntimeContextImplTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/runtime/RuntimeContextImplTestCase.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/runtime/RuntimeContextImplTestCase.java Thu Apr  6 18:11:28 2006
@@ -13,11 +13,8 @@
  */
 package org.apache.tuscany.core.runtime;
 
-import java.util.List;
-
 import junit.framework.Assert;
 import junit.framework.TestCase;
-
 import org.apache.tuscany.common.monitor.impl.NullMonitorFactory;
 import org.apache.tuscany.core.builder.ContextFactoryBuilder;
 import org.apache.tuscany.core.config.ConfigurationException;
@@ -31,15 +28,12 @@
 import org.apache.tuscany.core.system.assembly.SystemAssemblyFactory;
 import org.apache.tuscany.core.system.assembly.impl.SystemAssemblyFactoryImpl;
 import org.apache.tuscany.core.system.context.TestBuilder;
-import org.apache.tuscany.model.assembly.Component;
-import org.apache.tuscany.model.assembly.ConfiguredService;
-import org.apache.tuscany.model.assembly.EntryPoint;
-import org.apache.tuscany.model.assembly.ExternalService;
-import org.apache.tuscany.model.assembly.Scope;
-import org.apache.tuscany.model.assembly.Service;
+import org.apache.tuscany.model.assembly.*;
 import org.apache.tuscany.model.types.java.JavaServiceContract;
 import org.osoa.sca.ServiceUnavailableException;
 
+import java.util.List;
+
 /**
  * Performs basic tests on the runtime context
  * 
@@ -84,8 +78,8 @@
         service.setServiceContract(inter);
         system.registerModelObject(ep);
         system.fireEvent(EventContext.MODULE_START, null);
-        Assert.assertNotNull(system.locateInstance("TestService1"));
-        Assert.assertNotNull(system.locateInstance("TestService2EP"));
+        Assert.assertNotNull(system.getContext("TestService1").getInstance(null));
+        Assert.assertNotNull(system.getContext("TestService2EP").getInstance(null));
 
         // create a test module and wire an external service to the system entry point
         Component moduleComponent = MockFactory.createAggregateComponent("test.module");
@@ -95,7 +89,7 @@
         ExternalService es = MockFactory.createESSystemBinding("TestService2ES", "tuscany.system/TestService2EP");
         moduleContext.registerModelObject(es);
         moduleContext.fireEvent(EventContext.MODULE_START, null);
-        Assert.assertNotNull(moduleContext.locateInstance("TestService2ES"));
+        Assert.assertNotNull(moduleContext.getContext("TestService2ES").getInstance(null));
 
         moduleContext.fireEvent(EventContext.MODULE_STOP, null);
         system.fireEvent(EventContext.MODULE_STOP, null);
@@ -128,7 +122,7 @@
         system.fireEvent(EventContext.MODULE_START, null);
         moduleContext.fireEvent(EventContext.MODULE_START, null);
         // test that the autowire was resolved
-        Assert.assertNotNull(moduleContext.locateInstance("TestService2ES"));
+        Assert.assertNotNull(moduleContext.getContext("TestService2ES").getInstance(null));
 
         moduleContext.fireEvent(EventContext.MODULE_STOP, null);
         system.fireEvent(EventContext.MODULE_STOP, null);
@@ -238,8 +232,8 @@
 
         moduleContext1.fireEvent(EventContext.MODULE_START, null);
         moduleContext2.fireEvent(EventContext.MODULE_START, null);
-        Assert.assertNotNull(moduleContext2.locateInstance("ExternalService2"));
-        Assert.assertNotNull(moduleContext1.locateInstance("ExternalService1"));
+        Assert.assertNotNull(moduleContext2.getContext("ExternalService2").getInstance(null));
+        Assert.assertNotNull(moduleContext1.getContext("ExternalService1").getInstance(null));
         runtime.stop();
     }
 
@@ -289,7 +283,7 @@
         Component module1 = MockFactory.createAggregateComponent("module1");
         runtime.registerModelObject(module1);
         runtime.getContext("module1");
-        Assert.assertTrue(((TestBuilder) system.locateInstance("TestBuilder")).invoked());
+        Assert.assertTrue(((TestBuilder) system.getContext("TestBuilder").getInstance(null)).invoked());
         system.fireEvent(EventContext.MODULE_STOP, null);
         runtime.stop();
 

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/runtime/SystemBootstrapTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/runtime/SystemBootstrapTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/runtime/SystemBootstrapTestCase.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/runtime/SystemBootstrapTestCase.java Thu Apr  6 18:11:28 2006
@@ -13,11 +13,8 @@
  */
 package org.apache.tuscany.core.runtime;
 
-import java.util.List;
-
 import junit.framework.Assert;
 import junit.framework.TestCase;
-
 import org.apache.tuscany.common.monitor.impl.NullMonitorFactory;
 import org.apache.tuscany.core.builder.ContextFactoryBuilder;
 import org.apache.tuscany.core.context.AggregateContext;
@@ -30,13 +27,11 @@
 import org.apache.tuscany.core.mock.component.ModuleScopeSystemComponentImpl;
 import org.apache.tuscany.core.system.assembly.SystemAssemblyFactory;
 import org.apache.tuscany.core.system.assembly.impl.SystemAssemblyFactoryImpl;
-import org.apache.tuscany.model.assembly.Component;
-import org.apache.tuscany.model.assembly.EntryPoint;
-import org.apache.tuscany.model.assembly.ExternalService;
-import org.apache.tuscany.model.assembly.Module;
-import org.apache.tuscany.model.assembly.Service;
+import org.apache.tuscany.model.assembly.*;
 import org.apache.tuscany.model.types.java.JavaServiceContract;
 
+import java.util.List;
+
 /**
  * Tests bootstrapping a system module
  * 
@@ -72,10 +67,10 @@
         systemContext.fireEvent(EventContext.MODULE_START, null);
         moduleContext.fireEvent(EventContext.MODULE_START, null);
 
-        Assert.assertNotNull(systemContext.locateInstance("TestService1EP"));
-        GenericSystemComponent testService = (GenericSystemComponent) systemContext.locateInstance("TestService1");
+        Assert.assertNotNull(systemContext.getContext("TestService1EP").getInstance(null));
+        GenericSystemComponent testService = (GenericSystemComponent) systemContext.getContext("TestService1").getInstance(null);
         Assert.assertNotNull(testService);
-        GenericSystemComponent testES = (GenericSystemComponent) moduleContext.locateInstance("TestServiceES");
+        GenericSystemComponent testES = (GenericSystemComponent) moduleContext.getContext("TestServiceES").getInstance(null);
         Assert.assertNotNull(testES);
         Assert.assertSame(testService, testES);
     }
@@ -101,8 +96,8 @@
         ep.getConfiguredReference().getTargetConfiguredServices().get(0).setService(service);
         system.registerModelObject(ep);
         system.fireEvent(EventContext.MODULE_START, null);
-        Assert.assertNotNull(system.locateInstance("TestService1"));
-        Assert.assertNotNull(system.locateInstance("TestService2EP"));
+        Assert.assertNotNull(system.getContext("TestService1").getInstance(null));
+        Assert.assertNotNull(system.getContext("TestService2EP").getInstance(null));
 
         Assert.assertNotNull(((AutowireContext) system).resolveInstance(ModuleScopeSystemComponent.class));
         // create a test module
@@ -113,7 +108,7 @@
         ExternalService es = MockFactory.createESSystemBinding("TestService2ES", "tuscany.system/TestService2EP");
         moduleContext.registerModelObject(es);
         moduleContext.fireEvent(EventContext.MODULE_START, null);
-        Assert.assertNotNull(moduleContext.locateInstance("TestService2ES"));
+        Assert.assertNotNull(moduleContext.getContext("TestService2ES").getInstance(null));
 
         moduleContext.fireEvent(EventContext.MODULE_STOP, null);
         system.fireEvent(EventContext.MODULE_STOP, null);

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/builder/SystemContextFactoryBuilderTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/builder/SystemContextFactoryBuilderTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/builder/SystemContextFactoryBuilderTestCase.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/builder/SystemContextFactoryBuilderTestCase.java Thu Apr  6 18:11:28 2006
@@ -15,7 +15,6 @@
 
 import junit.framework.Assert;
 import junit.framework.TestCase;
-
 import org.apache.tuscany.common.monitor.impl.NullMonitorFactory;
 import org.apache.tuscany.core.builder.ContextFactory;
 import org.apache.tuscany.core.context.AggregateContext;

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/builder/impl/AssemblyVisitorTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/builder/impl/AssemblyVisitorTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/builder/impl/AssemblyVisitorTestCase.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/builder/impl/AssemblyVisitorTestCase.java Thu Apr  6 18:11:28 2006
@@ -13,12 +13,8 @@
  */
 package org.apache.tuscany.core.system.builder.impl;
 
-import java.util.ArrayList;
-import java.util.List;
-
 import junit.framework.Assert;
 import junit.framework.TestCase;
-
 import org.apache.tuscany.core.builder.BuilderException;
 import org.apache.tuscany.core.builder.ContextFactoryBuilder;
 import org.apache.tuscany.core.builder.impl.AssemblyVisitor;
@@ -27,20 +23,12 @@
 import org.apache.tuscany.core.system.assembly.SystemBinding;
 import org.apache.tuscany.core.system.assembly.SystemImplementation;
 import org.apache.tuscany.core.system.assembly.impl.SystemAssemblyFactoryImpl;
-import org.apache.tuscany.model.assembly.AssemblyModelContext;
-import org.apache.tuscany.model.assembly.AssemblyModelObject;
-import org.apache.tuscany.model.assembly.Component;
-import org.apache.tuscany.model.assembly.ComponentType;
-import org.apache.tuscany.model.assembly.ConfiguredPort;
-import org.apache.tuscany.model.assembly.ConfiguredReference;
-import org.apache.tuscany.model.assembly.ConfiguredService;
-import org.apache.tuscany.model.assembly.EntryPoint;
-import org.apache.tuscany.model.assembly.Module;
-import org.apache.tuscany.model.assembly.Reference;
-import org.apache.tuscany.model.assembly.ContextFactoryHolder;
-import org.apache.tuscany.model.assembly.Service;
+import org.apache.tuscany.model.assembly.*;
 import org.apache.tuscany.model.assembly.impl.AssemblyModelContextImpl;
 import org.apache.tuscany.model.types.java.JavaServiceContract;
+
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * Tests decorating a logical configuration model

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/AggregateNestingTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/AggregateNestingTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/AggregateNestingTestCase.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/AggregateNestingTestCase.java Thu Apr  6 18:11:28 2006
@@ -15,7 +15,6 @@
 
 import junit.framework.Assert;
 import junit.framework.TestCase;
-
 import org.apache.tuscany.core.context.AggregateContext;
 import org.apache.tuscany.core.context.EventContext;
 import org.apache.tuscany.core.mock.MockFactory;
@@ -88,7 +87,7 @@
     }
     
     private void analyzeLeafComponents(AggregateContext ctx) throws Exception {
-        Source source = (Source) ctx.locateInstance("source");
+        Source source = (Source) ctx.getContext("source").getInstance(null);
         Assert.assertNotNull(source);
         Target target = source.getTarget();
         Assert.assertNotNull(target);

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/AutowireTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/AutowireTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/AutowireTestCase.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/AutowireTestCase.java Thu Apr  6 18:11:28 2006
@@ -15,7 +15,6 @@
 package org.apache.tuscany.core.system.context;
 
 import junit.framework.TestCase;
-
 import org.apache.tuscany.core.context.AggregateContext;
 import org.apache.tuscany.core.context.EventContext;
 import org.apache.tuscany.core.context.SystemAggregateContext;
@@ -27,13 +26,7 @@
 import org.apache.tuscany.core.runtime.RuntimeContext;
 import org.apache.tuscany.core.system.assembly.SystemAssemblyFactory;
 import org.apache.tuscany.core.system.assembly.impl.SystemAssemblyFactoryImpl;
-import org.apache.tuscany.model.assembly.AssemblyModelContext;
-import org.apache.tuscany.model.assembly.Component;
-import org.apache.tuscany.model.assembly.EntryPoint;
-import org.apache.tuscany.model.assembly.Module;
-import org.apache.tuscany.model.assembly.ModuleComponent;
-import org.apache.tuscany.model.assembly.Scope;
-import org.apache.tuscany.model.assembly.Service;
+import org.apache.tuscany.model.assembly.*;
 import org.apache.tuscany.model.assembly.impl.AssemblyModelContextImpl;
 
 /**

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/IntraAggregateWireTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/IntraAggregateWireTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/IntraAggregateWireTestCase.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/IntraAggregateWireTestCase.java Thu Apr  6 18:11:28 2006
@@ -13,19 +13,18 @@
  */
 package org.apache.tuscany.core.system.context;
 
-import java.util.List;
-
 import junit.framework.Assert;
 import junit.framework.TestCase;
-
 import org.apache.tuscany.core.context.EventContext;
-import org.apache.tuscany.core.context.SystemAggregateContext;
 import org.apache.tuscany.core.context.SimpleComponentContext;
+import org.apache.tuscany.core.context.SystemAggregateContext;
 import org.apache.tuscany.core.mock.MockConfigContext;
 import org.apache.tuscany.core.mock.MockFactory;
 import org.apache.tuscany.core.mock.component.Source;
 import org.apache.tuscany.core.mock.component.Target;
 import org.apache.tuscany.model.assembly.Scope;
+
+import java.util.List;
 
 /**
  * Tests intra-aggregate system component wiring scenarios

Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/SystemAggregateComponentContextRegisterTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/SystemAggregateComponentContextRegisterTestCase.java?rev=392146&r1=392145&r2=392146&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/SystemAggregateComponentContextRegisterTestCase.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/system/context/SystemAggregateComponentContextRegisterTestCase.java Thu Apr  6 18:11:28 2006
@@ -13,8 +13,7 @@
  */
 package org.apache.tuscany.core.system.context;
 
-import java.util.List;
-
+import org.apache.tuscany.common.monitor.impl.NullMonitorFactory;
 import org.apache.tuscany.core.builder.ContextFactoryBuilder;
 import org.apache.tuscany.core.context.AggregateComponentContextRegisterTestCase;
 import org.apache.tuscany.core.context.AggregateContext;
@@ -22,7 +21,8 @@
 import org.apache.tuscany.core.context.scope.DefaultScopeStrategy;
 import org.apache.tuscany.core.mock.MockConfigContext;
 import org.apache.tuscany.core.mock.MockFactory;
-import org.apache.tuscany.common.monitor.impl.NullMonitorFactory;
+
+import java.util.List;
 
 /**
  * Tests registration of model objects for an system aggregate context



Mime
View raw message