tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmar...@apache.org
Subject svn commit: r415032 [2/5] - in /incubator/tuscany/sandbox/jboynes/sca: ./ buildtools/src/main/resources/ core2/ core2/src/main/java/org/apache/tuscany/core/bootstrap/ core2/src/main/java/org/apache/tuscany/core/builder/ core2/src/main/java/org/apache/t...
Date Sat, 17 Jun 2006 17:28:14 GMT
Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/RequestScopeContainer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/RequestScopeContainer.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/RequestScopeContainer.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/RequestScopeContainer.java Sat Jun 17 10:28:07 2006
@@ -72,7 +72,7 @@
 
     protected InstanceWrapper getInstanceWrapper(AtomicComponent component) throws TargetException {
         Map<Thread, InstanceWrapper> instanceContextMap = contexts.get(component);
-        assert(instanceContextMap != null):"Atomic component not registered";
+        assert instanceContextMap != null : "Atomic component not registered";
         InstanceWrapper ctx = instanceContextMap.get(Thread.currentThread());
         if (ctx == null) {
             ctx = new InstanceWrapperImpl(component, component.createInstance());
@@ -93,23 +93,20 @@
     private void shutdownInstances(Thread key) {
         List<InstanceWrapper> destroyQueue = destroyQueues.remove(key);
         if (destroyQueue != null && destroyQueue.size() > 0) {
-            if (destroyQueue != null) {
-                Thread thread = Thread.currentThread();
-                for (Map<Thread, InstanceWrapper> map : contexts.values()) {
-                    map.remove(thread);
-                }
-                ListIterator<InstanceWrapper> iter = destroyQueue.listIterator(destroyQueue.size());
-                synchronized (destroyQueue) {
-                    while (iter.hasPrevious()) {
-                        try {
-                            iter.previous().stop();
-                        } catch (TargetException e) {
-                            // TODO send a monitoring event
-                        }
+            Thread thread = Thread.currentThread();
+            for (Map<Thread, InstanceWrapper> map : contexts.values()) {
+                map.remove(thread);
+            }
+            ListIterator<InstanceWrapper> iter = destroyQueue.listIterator(destroyQueue.size());
+            synchronized (destroyQueue) {
+                while (iter.hasPrevious()) {
+                    try {
+                        iter.previous().stop();
+                    } catch (TargetException e) {
+                        // TODO send a monitoring event
                     }
                 }
             }
-
         }
     }
 

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/ScopeRegistryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/ScopeRegistryImpl.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/ScopeRegistryImpl.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/component/scope/ScopeRegistryImpl.java Sat Jun 17 10:28:07 2006
@@ -22,14 +22,14 @@
     private final WorkContext workContext;
 
     public ScopeRegistryImpl(WorkContext workContext) {
-        assert(workContext != null);
+        assert workContext != null;
         scopeCache = new ConcurrentHashMap<Scope, ScopeContainer>();
         factoryCache = new ConcurrentHashMap<Scope, ObjectFactory<? extends ScopeContainer>>();
         this.workContext = workContext;
     }
 
     public ScopeContainer getScopeContainer(Scope scope) {
-        assert Scope.MODULE != scope: "Cannot get MODULE scope from the registry";
+        assert Scope.MODULE != scope : "Cannot get MODULE scope from the registry";
         ScopeContainer container = scopeCache.get(scope);
         if (container == null) {
             ObjectFactory<? extends ScopeContainer> factory = factoryCache.get(scope);

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/composite/CompositeBuilder.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/composite/CompositeBuilder.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/composite/CompositeBuilder.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/composite/CompositeBuilder.java Sat Jun 17 10:28:07 2006
@@ -45,22 +45,28 @@
                               DeploymentContext deploymentContext) throws BuilderConfigException {
         CompositeImplementation implementation = componentDefinition.getImplementation();
         CompositeComponentType<?, ?, ?> componentType = implementation.getComponentType();
-        CompositeComponentImpl<?> context = new CompositeComponentImpl(componentDefinition.getName(), parent, null, wireService);
+        CompositeComponentImpl<?> context = new CompositeComponentImpl(componentDefinition.getName(),
+            parent,
+            null,
+            wireService);
         for (ReferenceTarget target : componentDefinition.getReferenceTargets().values()) {
             ReferenceDefinition referenceDefinition = target.getReference();
             if (referenceDefinition instanceof BoundReferenceDefinition) {
-                SCAObject<?> refereceSCAObject = builderRegistry.build(context, (BoundReferenceDefinition) referenceDefinition, deploymentContext);
+                SCAObject<?> refereceSCAObject = builderRegistry.build(context,
+                    (BoundReferenceDefinition) referenceDefinition,
+                    deploymentContext);
                 context.register(refereceSCAObject);
             }
         }
-        for (ComponentDefinition<? extends Implementation<?>> child : componentType.getComponents().values())
-        {
+        for (ComponentDefinition<? extends Implementation<?>> child : componentType.getComponents().values()) {
             SCAObject<?> childSCAObject = builderRegistry.build(context, child, deploymentContext);
             context.register(childSCAObject);
         }
         for (ServiceDefinition serviceDefinition : componentType.getServices().values()) {
             if (serviceDefinition instanceof BoundServiceDefinition) {
-                SCAObject<?> serviceSCAObject = builderRegistry.build(context, (BoundServiceDefinition) serviceDefinition, deploymentContext);
+                SCAObject<?> serviceSCAObject = builderRegistry.build(context,
+                    (BoundServiceDefinition) serviceDefinition,
+                    deploymentContext);
                 context.register(serviceSCAObject);
             }
         }

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/composite/CompositeLoader.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/composite/CompositeLoader.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/composite/CompositeLoader.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/composite/CompositeLoader.java Sat Jun 17 10:28:07 2006
@@ -52,7 +52,9 @@
         return AssemblyConstants.COMPOSITE;
     }
 
-    public CompositeComponentType load(XMLStreamReader reader, DeploymentContext deploymentContext) throws XMLStreamException, LoaderException {
+    public CompositeComponentType load(XMLStreamReader reader,
+                                       DeploymentContext deploymentContext)
+        throws XMLStreamException, LoaderException {
         CompositeComponentType composite = new CompositeComponentType();
         composite.setName(reader.getAttributeValue(null, "name"));
         while (true) {

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/deployer/DeployerImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/deployer/DeployerImpl.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/deployer/DeployerImpl.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/deployer/DeployerImpl.java Sat Jun 17 10:28:07 2006
@@ -55,7 +55,9 @@
         this.connector = connector;
     }
 
-    public <I extends Implementation<?>> SCAObject<?> deploy(CompositeComponent<?> parent, ComponentDefinition<I> componentDefinition) throws LoaderException {
+    public <I extends Implementation<?>> SCAObject<?> deploy(CompositeComponent<?> parent,
+                                                             ComponentDefinition<I> componentDefinition)
+        throws LoaderException {
         ScopeContainer moduleScope = new ModuleScopeContainer();
         DeploymentContext deploymentContext = new DeploymentContext(null, null, moduleScope);
         load(componentDefinition, deploymentContext);
@@ -72,7 +74,8 @@
      * @param componentDefinition the componentDefinition being deployed
      * @param deploymentContext   the current deployment context
      */
-    protected <I extends Implementation<?>> void load(ComponentDefinition<I> componentDefinition, DeploymentContext deploymentContext) throws LoaderException {
+    protected <I extends Implementation<?>> void load(ComponentDefinition<I> componentDefinition,
+                                                      DeploymentContext deploymentContext) throws LoaderException {
         loader.loadComponentType(componentDefinition.getImplementation(), deploymentContext);
     }
 
@@ -84,7 +87,9 @@
      * @param deploymentContext   the current deployment context
      * @return the new runtime context
      */
-    protected <I extends Implementation<?>> SCAObject<?> build(CompositeComponent<?> parent, ComponentDefinition<I> componentDefinition, DeploymentContext deploymentContext) {
+    protected <I extends Implementation<?>> SCAObject<?> build(CompositeComponent<?> parent,
+                                                               ComponentDefinition<I> componentDefinition,
+                                                               DeploymentContext deploymentContext) {
         return builder.build(parent, componentDefinition, deploymentContext);
     }
 

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/ArrayMultiplicityObjectFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/ArrayMultiplicityObjectFactory.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/ArrayMultiplicityObjectFactory.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/ArrayMultiplicityObjectFactory.java Sat Jun 17 10:28:07 2006
@@ -7,8 +7,8 @@
 import org.apache.tuscany.spi.ObjectFactory;
 
 /**
- * Resolves targets configured in a multiplicity by delegating to object factories and returning an
- * <code>Array</code> containing object instances
+ * Resolves targets configured in a multiplicity by delegating to object factories and returning an <code>Array</code>
+ * containing object instances
  *
  * @version $Rev$ $Date$
  */
@@ -19,8 +19,8 @@
     private Class interfaceType;
 
     public ArrayMultiplicityObjectFactory(Class interfaceType, List<ObjectFactory<?>> factories) {
-        assert (interfaceType != null) : "Interface type was null";
-        assert (factories != null) : "Object factories were null";
+        assert interfaceType != null : "Interface type was null";
+        assert factories != null : "Object factories were null";
         this.interfaceType = interfaceType;
         this.factories = factories.toArray(new ObjectFactory[factories.size()]);
     }

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/ContextInjector.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/ContextInjector.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/ContextInjector.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/ContextInjector.java Sat Jun 17 10:28:07 2006
@@ -9,7 +9,7 @@
  * @see MethodInjector
  * @see FieldInjector
  */
-public interface ContextInjector<S,T> extends Injector<T> {
+public interface ContextInjector<S, T> extends Injector<T> {
 
     void setContext(S context) throws ObjectCreationException;
 

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/FieldInjector.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/FieldInjector.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/FieldInjector.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/FieldInjector.java Sat Jun 17 10:28:07 2006
@@ -17,8 +17,8 @@
     private final ObjectFactory<?> objectFactory;
 
     /**
-     * Create an injector and have it use the given <code>ObjectFactory</code> to inject a value on the
-     * instance using the reflected <code>Field</code>
+     * Create an injector and have it use the given <code>ObjectFactory</code> to inject a value on the instance using
+     * the reflected <code>Field</code>
      */
     public FieldInjector(Field field, ObjectFactory<?> objectFactory) {
         this.field = field;

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/ListMultiplicityObjectFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/ListMultiplicityObjectFactory.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/ListMultiplicityObjectFactory.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/injection/ListMultiplicityObjectFactory.java Sat Jun 17 10:28:07 2006
@@ -7,8 +7,8 @@
 import org.apache.tuscany.spi.ObjectFactory;
 
 /**
- * Resolves targets configured in a multiplicity by delegating to object factories and returning an
- * <code>List</code> containing object instances
+ * Resolves targets configured in a multiplicity by delegating to object factories and returning an <code>List</code>
+ * containing object instances
  *
  * @version $Rev$ $Date$
  */
@@ -17,7 +17,7 @@
     private ObjectFactory[] factories;
 
     public ListMultiplicityObjectFactory(List<ObjectFactory<?>> factories) {
-        assert (factories != null) : "Object factories were null";
+        assert factories != null : "Object factories were null";
         this.factories = factories.toArray(new ObjectFactory[factories.size()]);
     }
 

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/ComponentLoader.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/ComponentLoader.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/ComponentLoader.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/ComponentLoader.java Sat Jun 17 10:28:07 2006
@@ -67,7 +67,9 @@
         return AssemblyConstants.COMPONENT;
     }
 
-    public ComponentDefinition<?> load(XMLStreamReader reader, DeploymentContext deploymentContext) throws XMLStreamException, LoaderException {
+    public ComponentDefinition<?> load(XMLStreamReader reader,
+                                       DeploymentContext deploymentContext)
+        throws XMLStreamException, LoaderException {
         assert AssemblyConstants.COMPONENT.equals(reader.getName());
         String name = reader.getAttributeValue(null, "name");
         reader.nextTag();
@@ -104,7 +106,9 @@
         }
     }
 
-    protected void loadProperty(XMLStreamReader reader, DeploymentContext deploymentContext, ComponentDefinition<?> componentDefinition) throws XMLStreamException, LoaderException {
+    protected void loadProperty(XMLStreamReader reader, DeploymentContext deploymentContext,
+                                ComponentDefinition<?> componentDefinition)
+        throws XMLStreamException, LoaderException {
         String name = reader.getAttributeValue(null, "name");
         Implementation<?> implementation = componentDefinition.getImplementation();
         ComponentType<?, ?, ?> componentType = implementation.getComponentType();
@@ -117,13 +121,18 @@
         componentDefinition.add(createPropertyValue(reader, property, name));
     }
 
-    private <T> PropertyValue<T> createPropertyValue(XMLStreamReader reader, Property<T> property, String name) throws XMLStreamException, LoaderException {
+    private <T> PropertyValue<T> createPropertyValue(XMLStreamReader reader,
+                                                     Property<T> property,
+                                                     String name) throws XMLStreamException, LoaderException {
         // todo allow property to specify the factory to use
         ObjectFactory<T> factory = defaultPropertyFactory.createObjectFactory(reader, property);
         return new PropertyValue<T>(name, factory);
     }
 
-    protected void loadReference(XMLStreamReader reader, DeploymentContext deploymentContext, ComponentDefinition<?> componentDefinition) throws XMLStreamException, LoaderException {
+    protected void loadReference(XMLStreamReader reader,
+                                 DeploymentContext deploymentContext,
+                                 ComponentDefinition<?> componentDefinition)
+        throws XMLStreamException, LoaderException {
         String name = reader.getAttributeValue(null, "name");
         String target = reader.getAttributeValue(null, "target");
         ReferenceTarget referenceTarget = new ReferenceTarget();
@@ -139,7 +148,8 @@
     }
 
 /*
-    protected StAXPropertyFactory<?> getPropertyFactory(String factoryName, ResourceLoader resourceLoader) throws InvalidPropertyFactoryException {
+    protected StAXPropertyFactory<?> getPropertyFactory(String factoryName,
+        ResourceLoader resourceLoader) throws InvalidPropertyFactoryException {
         Class<?> impl;
         try {
             // try to load factory from application classloader

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/ComponentTypeElementLoader.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/ComponentTypeElementLoader.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/ComponentTypeElementLoader.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/ComponentTypeElementLoader.java Sat Jun 17 10:28:07 2006
@@ -47,9 +47,11 @@
         return AssemblyConstants.COMPONENT_TYPE;
     }
 
-    public ComponentType load(XMLStreamReader reader, DeploymentContext deploymentContext) throws XMLStreamException, LoaderException {
+    public ComponentType load(XMLStreamReader reader,
+                              DeploymentContext deploymentContext) throws XMLStreamException, LoaderException {
         assert AssemblyConstants.COMPONENT_TYPE.equals(reader.getName());
-        ComponentType<ServiceDefinition, ReferenceDefinition, Property<?>> componentType = new ComponentType<ServiceDefinition, ReferenceDefinition, Property<?>>();
+        ComponentType<ServiceDefinition, ReferenceDefinition, Property<?>> componentType
+            = new ComponentType<ServiceDefinition, ReferenceDefinition, Property<?>>();
 
         while (true) {
             switch (reader.next()) {

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/InterfaceJavaLoader.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/InterfaceJavaLoader.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/InterfaceJavaLoader.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/InterfaceJavaLoader.java Sat Jun 17 10:28:07 2006
@@ -28,7 +28,7 @@
 
 /**
  * Loads a Java interface definition from an XML-based assembly file
- * 
+ *
  * @version $Rev$ $Date$
  */
 public class InterfaceJavaLoader extends LoaderExtension<JavaServiceContract> {
@@ -43,7 +43,10 @@
         return AssemblyConstants.INTERFACE_JAVA;
     }
 
-    public JavaServiceContract load(XMLStreamReader reader, DeploymentContext deploymentContext) throws XMLStreamException, LoaderException {
+    public JavaServiceContract load(XMLStreamReader reader,
+                                    DeploymentContext deploymentContext)
+        throws XMLStreamException, LoaderException {
+
         assert AssemblyConstants.INTERFACE_JAVA.equals(reader.getName());
         JavaServiceContract serviceContract = new JavaServiceContract();
         serviceContract.setInteractionScope(StAXUtil.interactionScope(reader.getAttributeValue(null, "scope")));

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/InterfaceWSDLLoader.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/InterfaceWSDLLoader.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/InterfaceWSDLLoader.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/InterfaceWSDLLoader.java Sat Jun 17 10:28:07 2006
@@ -50,7 +50,9 @@
         return AssemblyConstants.INTERFACE_WSDL;
     }
 
-    public WSDLServiceContract load(XMLStreamReader reader, DeploymentContext deploymentContext) throws XMLStreamException, LoaderException {
+    public WSDLServiceContract load(XMLStreamReader reader,
+                                    DeploymentContext deploymentContext)
+        throws XMLStreamException, LoaderException {
         assert AssemblyConstants.INTERFACE_WSDL.equals(reader.getName());
         WSDLServiceContract serviceContract = new WSDLServiceContract();
         serviceContract.setInteractionScope(StAXUtil.interactionScope(reader.getAttributeValue(null, "scope")));

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/JNDIPropertyFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/JNDIPropertyFactory.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/JNDIPropertyFactory.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/JNDIPropertyFactory.java Sat Jun 17 10:28:07 2006
@@ -31,15 +31,16 @@
 /**
  * A StAXPropertyFactory that creates property values by looking them up in the default JNDI InitialContext.
  * <p/>
- * This can be used to locate resources in a J2EE environment and inject them as configuration properties. For
- * example, to access a database a component could write: <code> &at;Property DataSource myDB; </code> and
- * configure with <code> &lt;properties&gt; &lt;v:myDb&gt;java:comp/env/jdbc/MyDatabase&lt;/v:myDB&gt;
- * &lt;/properties&gt; </code>
+ * This can be used to locate resources in a J2EE environment and inject them as configuration properties. For example,
+ * to access a database a component could write: <code> &at;Property DataSource myDB; </code> and configure with <code>
+ * &lt;properties&gt; &lt;v:myDb&gt;java:comp/env/jdbc/MyDatabase&lt;/v:myDB&gt; &lt;/properties&gt; </code>
  *
  * @version $Rev$ $Date$
  */
 public class JNDIPropertyFactory implements StAXPropertyFactory {
-    public <T> ObjectFactory<T> createObjectFactory(XMLStreamReader reader, Property<T> property) throws XMLStreamException, LoaderException {
+    public <T> ObjectFactory<T> createObjectFactory(XMLStreamReader reader,
+                                                    Property<T> property)
+        throws XMLStreamException, LoaderException {
         Class<T> type = property.getJavaType();
         assert type != null : "property type is null";
         String text = reader.getElementText();

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/LoaderRegistryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/LoaderRegistryImpl.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/LoaderRegistryImpl.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/LoaderRegistryImpl.java Sat Jun 17 10:28:07 2006
@@ -43,9 +43,10 @@
 public class LoaderRegistryImpl implements LoaderRegistry {
     private Monitor monitor;
     private final Map<QName, StAXElementLoader<? extends ModelObject>> loaders =
-            new HashMap<QName, StAXElementLoader<? extends ModelObject>>();
-    private final Map<Class<? extends Implementation<?>>, ComponentTypeLoader<? extends Implementation<?>>> componentTypeLoaders =
-            new HashMap<Class<? extends Implementation<?>>, ComponentTypeLoader<? extends Implementation<?>>>();
+        new HashMap<QName, StAXElementLoader<? extends ModelObject>>();
+    private final Map<Class<? extends Implementation<?>>,
+        ComponentTypeLoader<? extends Implementation<?>>> componentTypeLoaders =
+        new HashMap<Class<? extends Implementation<?>>, ComponentTypeLoader<? extends Implementation<?>>>();
 
 
     @org.apache.tuscany.spi.annotation.Monitor
@@ -63,7 +64,8 @@
         loaders.remove(element);
     }
 
-    public ModelObject load(XMLStreamReader reader, DeploymentContext deploymentContext) throws XMLStreamException, LoaderException {
+    public ModelObject load(XMLStreamReader reader,
+                            DeploymentContext deploymentContext) throws XMLStreamException, LoaderException {
         QName name = reader.getName();
         monitor.elementLoad(name);
         StAXElementLoader<? extends ModelObject> loader = loaders.get(name);
@@ -73,18 +75,18 @@
         return loader.load(reader, deploymentContext);
     }
 
-    public <MO extends ModelObject> MO load(URL url, Class<MO> type, DeploymentContext deploymentContext) throws LoaderException {
+    public <MO extends ModelObject> MO load(URL url, Class<MO> type, DeploymentContext ctx) throws LoaderException {
         try {
             XMLStreamReader reader;
             InputStream is;
             is = url.openStream();
             try {
-                XMLInputFactory factory = deploymentContext.getXmlFactory();
+                XMLInputFactory factory = ctx.getXmlFactory();
                 reader = factory.createXMLStreamReader(is);
                 try {
                     reader.nextTag();
                     QName name = reader.getName();
-                    ModelObject mo = load(reader, deploymentContext);
+                    ModelObject mo = load(reader, ctx);
                     if (type.isInstance(mo)) {
                         return type.cast(mo);
                     } else {
@@ -126,7 +128,9 @@
     }
 
     @SuppressWarnings("unchecked")
-    public <I extends Implementation<?>> void loadComponentType(I implementation, DeploymentContext deploymentContext) throws LoaderException {
+    public <I extends Implementation<?>> void loadComponentType(I implementation,
+                                                                DeploymentContext deploymentContext)
+        throws LoaderException {
         Class<I> key = (Class<I>) implementation.getClass();
         ComponentTypeLoader<I> loader = (ComponentTypeLoader<I>) componentTypeLoaders.get(key);
         if (loader == null) {

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/PropertyLoader.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/PropertyLoader.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/PropertyLoader.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/PropertyLoader.java Sat Jun 17 10:28:07 2006
@@ -44,7 +44,7 @@
         return PROPERTY;
     }
 
-    public Property<?> load(XMLStreamReader reader, DeploymentContext deploymentContext) throws XMLStreamException, LoaderException {
+    public Property<?> load(XMLStreamReader reader, DeploymentContext ctx) throws XMLStreamException, LoaderException {
         assert PROPERTY.equals(reader.getName());
         Property<?> property = new Property();
         property.setName(reader.getAttributeValue(null, "name"));

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/ReferenceLoader.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/ReferenceLoader.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/ReferenceLoader.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/ReferenceLoader.java Sat Jun 17 10:28:07 2006
@@ -48,11 +48,13 @@
         return AssemblyConstants.REFERENCE;
     }
 
-    public ReferenceDefinition load(XMLStreamReader reader, DeploymentContext deploymentContext) throws XMLStreamException, LoaderException {
+    public ReferenceDefinition load(XMLStreamReader reader, DeploymentContext deploymentContext)
+        throws XMLStreamException, LoaderException {
         assert AssemblyConstants.REFERENCE.equals(reader.getName());
         ReferenceDefinition referenceDefinition = new ReferenceDefinition();
         referenceDefinition.setName(reader.getAttributeValue(null, "name"));
-        referenceDefinition.setMultiplicity(StAXUtil.multiplicity(reader.getAttributeValue(null, "multiplicity"), Multiplicity.ONE_ONE));
+        referenceDefinition.setMultiplicity(
+            StAXUtil.multiplicity(reader.getAttributeValue(null, "multiplicity"), Multiplicity.ONE_ONE));
 
         while (true) {
             switch (reader.next()) {

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/ServiceLoader.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/ServiceLoader.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/ServiceLoader.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/ServiceLoader.java Sat Jun 17 10:28:07 2006
@@ -49,7 +49,8 @@
         return AssemblyConstants.SERVICE;
     }
 
-    public ServiceDefinition load(XMLStreamReader reader, DeploymentContext deploymentContext) throws XMLStreamException, LoaderException {
+    public ServiceDefinition load(XMLStreamReader reader, DeploymentContext deploymentContext)
+        throws XMLStreamException, LoaderException {
         assert AssemblyConstants.SERVICE.equals(reader.getName());
         String name = reader.getAttributeValue(null, "name");
         Binding binding = null;

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/StAXUtil.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/StAXUtil.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/StAXUtil.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/StAXUtil.java Sat Jun 17 10:28:07 2006
@@ -77,8 +77,8 @@
     }
 
     /**
-     * Convert a "scope" attribute to the equivalent enum value. Returns CONVERSATIONAL if the value equals
-     * (ignoring case) "conversational", otherwise returns NONCONVERSATIONAL.
+     * Convert a "scope" attribute to the equivalent enum value. Returns CONVERSATIONAL if the value equals (ignoring
+     * case) "conversational", otherwise returns NONCONVERSATIONAL.
      *
      * @param scope the attribute to convert
      * @return the enum equivalent

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/StringParserPropertyFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/StringParserPropertyFactory.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/StringParserPropertyFactory.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/loader/StringParserPropertyFactory.java Sat Jun 17 10:28:07 2006
@@ -35,7 +35,8 @@
  * @version $Rev$ $Date$
  */
 public class StringParserPropertyFactory implements StAXPropertyFactory {
-    public <T> ObjectFactory<T> createObjectFactory(XMLStreamReader reader, Property<T> property) throws XMLStreamException, LoaderException {
+    public <T> ObjectFactory<T> createObjectFactory(XMLStreamReader reader, Property<T> property)
+        throws XMLStreamException, LoaderException {
         Class<T> type = property.getJavaType();
         assert type != null : "property type is null";
         String text = reader.getElementText();
@@ -49,7 +50,8 @@
         if (byte[].class.equals(type)) {
             byte[] instance = new byte[text.length() >> 1];
             for (int i = 0; i < instance.length; i++) {
-                instance[i] = (byte) (Character.digit(text.charAt(i << 1), 16) << 4 | Character.digit(text.charAt((i << 1) + 1), 16));
+                instance[i] = (byte) (Character.digit(text.charAt(i << 1), 16) << 4
+                    | Character.digit(text.charAt((i << 1) + 1), 16));
             }
             return new SingletonObjectFactory<T>(type.cast(instance));
         }

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/model/PojoComponentType.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/model/PojoComponentType.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/model/PojoComponentType.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/model/PojoComponentType.java Sat Jun 17 10:28:07 2006
@@ -19,7 +19,8 @@
  *
  * @version $$Rev$$ $$Date$$
  */
-public class PojoComponentType<S extends ServiceDefinition, R extends ReferenceDefinition, P extends Property<?>> extends ComponentType<S, R, P> {
+public class PojoComponentType<S extends ServiceDefinition, R extends ReferenceDefinition,  P extends Property<?>>
+    extends ComponentType<S, R, P> {
 
     private Scope lifecycleScope = Scope.UNDEFINED;
     private EventInvoker<Object> initInvoker;

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/monitor/JavaLoggingMonitorFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/monitor/JavaLoggingMonitorFactory.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/monitor/JavaLoggingMonitorFactory.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/monitor/JavaLoggingMonitorFactory.java Sat Jun 17 10:28:07 2006
@@ -35,8 +35,7 @@
 import org.apache.tuscany.spi.monitor.MonitorFactory;
 
 /**
- * A factory for monitors that forwards events to a {@link java.util.logging.Logger Java Logging (JSR47)
- * Logger}.
+ * A factory for monitors that forwards events to a {@link java.util.logging.Logger Java Logging (JSR47) Logger}.
  *
  * @version $Rev$ $Date$
  * @see java.util.logging
@@ -49,12 +48,12 @@
     private final Map<Class<?>, WeakReference<?>> proxies = new WeakHashMap<Class<?>, WeakReference<?>>();
 
     /**
-     * Construct a MonitorFactory that will monitor the specified methods at the specified levels and generate
-     * messages using java.util.logging.
+     * Construct a MonitorFactory that will monitor the specified methods at the specified levels and generate messages
+     * using java.util.logging.
      * <p/>
-     * The supplied Properties can be used to specify custom log levels for specific monitor methods. The key
-     * should be the method name in form returned by <code>Class.getName() + '#' + Method.getName()</code> and
-     * the value the log level to use as defined by {@link java.util.logging.Level}.
+     * The supplied Properties can be used to specify custom log levels for specific monitor methods. The key should be
+     * the method name in form returned by <code>Class.getName() + '#' + Method.getName()</code> and the value the log
+     * level to use as defined by {@link java.util.logging.Level}.
      *
      * @param levels       definition of custom levels for specific monitored methods
      * @param defaultLevel the default log level to use
@@ -120,7 +119,8 @@
         ResourceBundle bundle = locateBundle(monitorInterface, bundleName);
 
         InvocationHandler handler = new LoggingHandler(logger, levels, bundle);
-        return monitorInterface.cast(Proxy.newProxyInstance(monitorInterface.getClassLoader(), new Class<?>[]{monitorInterface}, handler));
+        return monitorInterface
+            .cast(Proxy.newProxyInstance(monitorInterface.getClassLoader(), new Class<?>[]{monitorInterface}, handler));
     }
 
     private static <T>ResourceBundle locateBundle(Class<T> monitorInterface, String bundleName) {
@@ -131,6 +131,7 @@
             try {
                 return ResourceBundle.getBundle(packageName + '.' + bundleName, locale, cl);
             } catch (MissingResourceException e) {
+                //ok
             }
             int index = packageName.lastIndexOf('.');
             if (index == -1) {

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/monitor/NullMonitorFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/monitor/NullMonitorFactory.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/monitor/NullMonitorFactory.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/monitor/NullMonitorFactory.java Sat Jun 17 10:28:07 2006
@@ -28,15 +28,6 @@
  * @version $Rev$ $Date$
  */
 public class NullMonitorFactory implements MonitorFactory {
-    public <T> T getMonitor(Class<T> monitorInterface) {
-        /*
-         * This uses a reflection proxy to implement the monitor interface which
-         * is a simple but perhaps not very performant solution. Performance
-         * might be improved by code generating an implementation with empty methods.
-         */
-        return monitorInterface.cast(Proxy.newProxyInstance(monitorInterface.getClassLoader(), new Class<?>[]{monitorInterface}, NULL_MONITOR));
-    }
-
     /**
      * Singleton wire hander that does nothing.
      */
@@ -45,4 +36,15 @@
             return null;
         }
     };
+
+    public <T> T getMonitor(Class<T> monitorInterface) {
+        /*
+         * This uses a reflection proxy to implement the monitor interface which
+         * is a simple but perhaps not very performant solution. Performance
+         * might be improved by code generating an implementation with empty methods.
+         */
+        return monitorInterface.cast(
+            Proxy.newProxyInstance(monitorInterface.getClassLoader(), new Class<?>[]{monitorInterface}, NULL_MONITOR));
+    }
+
 }

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/policy/PolicyBuilderRegistryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/policy/PolicyBuilderRegistryImpl.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/policy/PolicyBuilderRegistryImpl.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/policy/PolicyBuilderRegistryImpl.java Sat Jun 17 10:28:07 2006
@@ -32,12 +32,12 @@
     }
 
     public void registerTargetBuilder(int phase, TargetPolicyBuilder builder) {
-        assert(phase >= FINAL): "Illegal phase";
+        assert phase >= FINAL : "Illegal phase";
         targetBuilders.get(phase).add(builder);
     }
 
     public void registerSourceBuilder(int phase, SourcePolicyBuilder builder) {
-        assert(phase >= FINAL): "Illegal phase";
+        assert phase >= FINAL : "Illegal phase";
         sourceBuilders.get(phase).add(builder);
     }
 

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/policy/async/AsyncInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/policy/async/AsyncInterceptor.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/policy/async/AsyncInterceptor.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/policy/async/AsyncInterceptor.java Sat Jun 17 10:28:07 2006
@@ -4,14 +4,15 @@
 import javax.resource.spi.work.WorkException;
 import javax.resource.spi.work.WorkManager;
 
-import org.apache.tuscany.spi.wire.Interceptor;
-import org.apache.tuscany.spi.wire.Message;
-import org.apache.tuscany.spi.wire.MessageChannel;
-import org.apache.tuscany.spi.wire.TargetInvoker;
 import org.osoa.sca.CurrentModuleContext;
 import org.osoa.sca.ModuleContext;
 import org.osoa.sca.SCA;
 import org.osoa.sca.ServiceRuntimeException;
+
+import org.apache.tuscany.spi.wire.Interceptor;
+import org.apache.tuscany.spi.wire.Message;
+import org.apache.tuscany.spi.wire.MessageChannel;
+import org.apache.tuscany.spi.wire.TargetInvoker;
 
 /**
  * Uses a <code>WorkManager</code> to schedule asynchronous execution of invocations

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/policy/async/AsyncMonitor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/policy/async/AsyncMonitor.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/policy/async/AsyncMonitor.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/policy/async/AsyncMonitor.java Sat Jun 17 10:28:07 2006
@@ -7,6 +7,6 @@
  */
 public interface AsyncMonitor {
 
-    public void executionError(Exception e);
+    void executionError(Exception e);
 
 }

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/policy/async/AsyncPolicyBuilder.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/policy/async/AsyncPolicyBuilder.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/policy/async/AsyncPolicyBuilder.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/policy/async/AsyncPolicyBuilder.java Sat Jun 17 10:28:07 2006
@@ -2,6 +2,9 @@
 
 import javax.resource.spi.work.WorkManager;
 
+import org.osoa.sca.annotations.Init;
+import org.osoa.sca.annotations.OneWay;
+
 import org.apache.tuscany.core.monitor.NullMonitorFactory;
 import org.apache.tuscany.spi.annotation.Autowire;
 import org.apache.tuscany.spi.builder.BuilderException;
@@ -11,8 +14,6 @@
 import org.apache.tuscany.spi.policy.TargetPolicyBuilder;
 import org.apache.tuscany.spi.wire.InboundInvocationChain;
 import org.apache.tuscany.spi.wire.InboundWire;
-import org.osoa.sca.annotations.Init;
-import org.osoa.sca.annotations.OneWay;
 
 /**
  * A policy builder for handling the {@link OneWay} annotation

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/services/workmanager/DefaultWorkManager.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/services/workmanager/DefaultWorkManager.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/services/workmanager/DefaultWorkManager.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/services/workmanager/DefaultWorkManager.java Sat Jun 17 10:28:07 2006
@@ -2,14 +2,15 @@
 
 import javax.resource.spi.work.WorkManager;
 
-import org.apache.geronimo.connector.work.GeronimoWorkManager;
-import org.apache.geronimo.transaction.context.TransactionContextManager;
 import org.osoa.sca.annotations.Destroy;
 import org.osoa.sca.annotations.Init;
 import org.osoa.sca.annotations.Property;
 import org.osoa.sca.annotations.Scope;
 import org.osoa.sca.annotations.Service;
 
+import org.apache.geronimo.connector.work.GeronimoWorkManager;
+import org.apache.geronimo.transaction.context.TransactionContextManager;
+
 /**
  * A <code>WorkManager</code> service component implementation which just reuses the Geronimo WorkManager.
  *
@@ -19,7 +20,7 @@
 @Scope("MODULE")
 public class DefaultWorkManager extends GeronimoWorkManager implements WorkManager {
 
-    private final static int DEFAULT_POOL_SIZE = 10;
+    private static final int DEFAULT_POOL_SIZE = 10;
 
     public DefaultWorkManager() {
         super(DEFAULT_POOL_SIZE, new TransactionContextManager());

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/services/wsdl/WSDLDefinitionRegistryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/services/wsdl/WSDLDefinitionRegistryImpl.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/services/wsdl/WSDLDefinitionRegistryImpl.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/services/wsdl/WSDLDefinitionRegistryImpl.java Sat Jun 17 10:28:07 2006
@@ -102,7 +102,8 @@
         definition = reader.readWSDL(location.toString());
         String definitionNamespace = definition.getTargetNamespace();
         if (namespace != null && !namespace.equals(definitionNamespace)) {
-            throw new WSDLException(WSDLException.CONFIGURATION_ERROR, namespace + " != " + definition.getTargetNamespace());
+            throw new WSDLException(WSDLException.CONFIGURATION_ERROR,
+                namespace + " != " + definition.getTargetNamespace());
         }
 
         monitor.cachingDefinition(definitionNamespace, location);
@@ -149,8 +150,8 @@
 
     public static interface Monitor {
         /**
-         * Monitor event emitted immediately before an attempt is made to read WSDL for the supplied namespace
-         * from the supplied location.
+         * Monitor event emitted immediately before an attempt is made to read WSDL for the supplied namespace from the
+         * supplied location.
          *
          * @param namespace the target namespace expected in the WSDL; may be null
          * @param location  the location where we will attempt to read the WSDL definition from

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/builder/SystemBindingBuilder.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/builder/SystemBindingBuilder.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/builder/SystemBindingBuilder.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/builder/SystemBindingBuilder.java Sat Jun 17 10:28:07 2006
@@ -1,10 +1,10 @@
 package org.apache.tuscany.core.system.builder;
 
 import org.apache.tuscany.core.component.AutowireComponent;
+import org.apache.tuscany.core.system.component.SystemReference;
 import org.apache.tuscany.core.system.component.SystemReferenceImpl;
 import org.apache.tuscany.core.system.component.SystemService;
 import org.apache.tuscany.core.system.component.SystemServiceImpl;
-import org.apache.tuscany.core.system.component.SystemReference;
 import org.apache.tuscany.core.system.model.SystemBinding;
 import org.apache.tuscany.core.system.wire.SystemInboundWire;
 import org.apache.tuscany.core.system.wire.SystemInboundWireImpl;
@@ -15,7 +15,6 @@
 import org.apache.tuscany.spi.builder.BindingBuilder;
 import org.apache.tuscany.spi.component.Component;
 import org.apache.tuscany.spi.component.CompositeComponent;
-import org.apache.tuscany.spi.component.SCAObject;
 import org.apache.tuscany.spi.deployer.DeploymentContext;
 import org.apache.tuscany.spi.model.BoundReferenceDefinition;
 import org.apache.tuscany.spi.model.BoundServiceDefinition;
@@ -28,25 +27,33 @@
  */
 public class SystemBindingBuilder implements BindingBuilder<SystemBinding> {
 
-    public SystemService build(CompositeComponent parent, BoundServiceDefinition<SystemBinding> boundServiceDefinition, DeploymentContext deploymentContext) {
+    public SystemService build(CompositeComponent parent,
+                               BoundServiceDefinition<SystemBinding> boundServiceDefinition,
+                               DeploymentContext deploymentContext) {
         Class<?> interfaze = boundServiceDefinition.getServiceContract().getInterfaceClass();
         QualifiedName targetName = new QualifiedName(boundServiceDefinition.getTarget().getPath());
         Component target = (Component) parent.getChild(targetName.getPartName());
-        SystemInboundWire<?> inboundWire = new SystemInboundWireImpl(boundServiceDefinition.getName(), interfaze, target);
-        SystemOutboundWire<?> outboundWire = new SystemOutboundWireImpl(boundServiceDefinition.getName(), targetName, interfaze);
+        SystemInboundWire<?> inboundWire =
+            new SystemInboundWireImpl(boundServiceDefinition.getName(), interfaze, target);
+        SystemOutboundWire<?> outboundWire =
+            new SystemOutboundWireImpl(boundServiceDefinition.getName(), targetName, interfaze);
         SystemService service = new SystemServiceImpl(boundServiceDefinition.getName(), parent);
         service.setInboundWire(inboundWire);
         service.setOutboundWire(outboundWire);
         return service;
     }
 
-    public SystemReference build(CompositeComponent parent, BoundReferenceDefinition<SystemBinding> boundReferenceDefinition, DeploymentContext deploymentContext) {
-        assert(parent.getParent() instanceof AutowireComponent):"Grandparent not an instance of " + AutowireComponent.class.getName();
+    public SystemReference build(CompositeComponent parent,
+                                 BoundReferenceDefinition<SystemBinding> boundReferenceDefinition,
+                                 DeploymentContext deploymentContext) {
+        assert parent.getParent() instanceof AutowireComponent
+            : "Grandparent not an instance of " + AutowireComponent.class.getName();
         AutowireComponent autowireComponent = (AutowireComponent) parent.getParent();
         Class<?> interfaze = boundReferenceDefinition.getServiceContract().getInterfaceClass();
         SystemReferenceImpl reference = new SystemReferenceImpl(boundReferenceDefinition.getName(), interfaze, parent);
         SystemInboundWire<?> inboundWire = new SystemInboundWireImpl(boundReferenceDefinition.getName(), interfaze);
-        OutboundWire<?> outboundWire = new SystemOutboundAutowire(boundReferenceDefinition.getName(), interfaze, autowireComponent);
+        OutboundWire<?> outboundWire =
+            new SystemOutboundAutowire(boundReferenceDefinition.getName(), interfaze, autowireComponent);
         reference.setInboundWire(inboundWire);
         reference.setOutboundWire(outboundWire);
         return reference;

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/builder/SystemComponentBuilder.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/builder/SystemComponentBuilder.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/builder/SystemComponentBuilder.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/builder/SystemComponentBuilder.java Sat Jun 17 10:28:07 2006
@@ -23,9 +23,9 @@
 import org.apache.tuscany.spi.QualifiedName;
 import org.apache.tuscany.spi.builder.BuilderConfigException;
 import org.apache.tuscany.spi.builder.ComponentBuilder;
+import org.apache.tuscany.spi.component.AtomicComponent;
 import org.apache.tuscany.spi.component.CompositeComponent;
 import org.apache.tuscany.spi.component.ScopeContainer;
-import org.apache.tuscany.spi.component.AtomicComponent;
 import org.apache.tuscany.spi.deployer.DeploymentContext;
 import org.apache.tuscany.spi.model.ComponentDefinition;
 import org.apache.tuscany.spi.model.ReferenceTarget;
@@ -39,8 +39,10 @@
  */
 public class SystemComponentBuilder implements ComponentBuilder<SystemImplementation> {
 
-    public AtomicComponent<?> build(CompositeComponent<?> parent, ComponentDefinition<SystemImplementation> componentDefinition, DeploymentContext deploymentContext) throws BuilderConfigException {
-        assert(parent instanceof AutowireComponent): "Parent must implement " + AutowireComponent.class.getName();
+    public AtomicComponent<?> build(CompositeComponent<?> parent,
+                                    ComponentDefinition<SystemImplementation> componentDefinition,
+                                    DeploymentContext deploymentContext) throws BuilderConfigException {
+        assert parent instanceof AutowireComponent : "Parent must implement " + AutowireComponent.class.getName();
         AutowireComponent autowireContext = (AutowireComponent) parent;
         PojoComponentType<?, ?, ?> componentType = componentDefinition.getImplementation().getComponentType();
         List<Class<?>> serviceInterfaces = new ArrayList<Class<?>>();
@@ -49,7 +51,8 @@
         }
         Constructor<?> constr;
         try {
-            constr = JavaIntrospectionHelper.getDefaultConstructor(componentDefinition.getImplementation().getImplementationClass());
+            constr = JavaIntrospectionHelper.getDefaultConstructor(
+                componentDefinition.getImplementation().getImplementationClass());
         } catch (NoSuchMethodException e) {
             BuilderConfigException bce = new BuilderConfigException("Error building componentDefinition", e);
             bce.setIdentifier(componentDefinition.getName());
@@ -75,20 +78,21 @@
         }
         ScopeContainer scopeContainer = deploymentContext.getModuleScope();
         SystemAtomicComponent systemContext =
-                new SystemAtomicComponentImpl(componentDefinition.getName(),
-                        parent,
-                        scopeContainer,
-                        serviceInterfaces,
-                        factory,
-                        componentType.isEagerInit(),
-                        componentType.getInitInvoker(),
-                        componentType.getDestroyInvoker(),
-                        injectors,
-                        members);
+            new SystemAtomicComponentImpl(componentDefinition.getName(),
+                parent,
+                scopeContainer,
+                serviceInterfaces,
+                factory,
+                componentType.isEagerInit(),
+                componentType.getInitInvoker(),
+                componentType.getDestroyInvoker(),
+                injectors,
+                members);
 
         for (ServiceDefinition serviceDefinition : componentType.getServices().values()) {
             Class interfaze = serviceDefinition.getServiceContract().getInterfaceClass();
-            SystemInboundWire<?> wire = new SystemInboundWireImpl(serviceDefinition.getName(), interfaze, systemContext);
+            SystemInboundWire<?> wire =
+                new SystemInboundWireImpl(serviceDefinition.getName(), interfaze, systemContext);
             systemContext.addInboundWire(wire);
         }
         for (ReferenceTarget target : componentDefinition.getReferenceTargets().values()) {
@@ -107,7 +111,7 @@
                 wire = new SystemOutboundAutowire(referenceName, interfaze, autowireContext);
             } else {
                 //FIXME support multiplicity!
-                assert(target.getTargets().size() == 1): "Multiplicity not yet implemented";
+                assert target.getTargets().size() == 1 : "Multiplicity not yet implemented";
                 QualifiedName targetName = new QualifiedName(target.getTargets().get(0).getPath());
                 wire = new SystemOutboundWireImpl(referenceName, targetName, interfaze);
             }

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/builder/SystemCompositeBuilder.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/builder/SystemCompositeBuilder.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/builder/SystemCompositeBuilder.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/builder/SystemCompositeBuilder.java Sat Jun 17 10:28:07 2006
@@ -58,17 +58,22 @@
         this.builderRegistry = builderRegistry;
     }
 
-    public Component<?> build(CompositeComponent<?> parent, ComponentDefinition<SystemCompositeImplementation> componentDefinition, DeploymentContext deploymentContext) throws BuilderConfigException {
+    public Component<?> build(CompositeComponent<?> parent,
+                              ComponentDefinition<SystemCompositeImplementation> componentDefinition,
+                              DeploymentContext deploymentContext) throws BuilderConfigException {
         SystemCompositeImplementation impl = componentDefinition.getImplementation();
         CompositeComponentType<?, ?, ?> componentType = impl.getComponentType();
-        SystemCompositeComponent<?> context = new SystemCompositeComponentImpl(componentDefinition.getName(), parent, getAutowireContext(parent));
+        SystemCompositeComponent<?> context =
+            new SystemCompositeComponentImpl(componentDefinition.getName(), parent, getAutowireContext(parent));
         for (ServiceDefinition serviceDefinition : componentType.getServices().values()) {
             if (serviceDefinition instanceof BoundServiceDefinition) {
-                context.register(builderRegistry.build(context, (BoundServiceDefinition<? extends Binding>) serviceDefinition, deploymentContext));
+                context.register(builderRegistry.build(context,
+                    (BoundServiceDefinition<? extends Binding>) serviceDefinition,
+                    deploymentContext));
             }
         }
-        for (ComponentDefinition<? extends Implementation> childComponentDefinition : componentType.getComponents().values())
-        {
+        for (ComponentDefinition<? extends Implementation> childComponentDefinition
+            : componentType.getComponents().values()) {
             context.register(builderRegistry.build(context, childComponentDefinition, deploymentContext));
         }
         return context;

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemAtomicComponent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemAtomicComponent.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemAtomicComponent.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemAtomicComponent.java Sat Jun 17 10:28:07 2006
@@ -11,8 +11,8 @@
 public interface SystemAtomicComponent<T> extends AtomicComponent<T> {
 
     /**
-     * Returns the target instance associated with the component. A target instance is the actual object a
-     * request is dispatched to sans wire chain.
+     * Returns the target instance associated with the component. A target instance is the actual object a request is
+     * dispatched to sans wire chain.
      *
      * @throws org.apache.tuscany.spi.component.TargetException
      *

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemAtomicComponentImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemAtomicComponentImpl.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemAtomicComponentImpl.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemAtomicComponentImpl.java Sat Jun 17 10:28:07 2006
@@ -42,7 +42,17 @@
                                      EventInvoker<Object> destroyInvoker,
                                      List<Injector> injectors,
                                      Map<String, Member> members) {
-        super(name, parent, scopeContainer, serviceInterface, objectFactory, eagerInit, initInvoker, destroyInvoker, injectors, members, null);
+        super(name,
+            parent,
+            scopeContainer,
+            serviceInterface,
+            objectFactory,
+            eagerInit,
+            initInvoker,
+            destroyInvoker,
+            injectors,
+            members,
+            null);
         scope = Scope.MODULE;
     }
 
@@ -56,7 +66,17 @@
                                      EventInvoker<Object> destroyInvoker,
                                      List<Injector> injectors,
                                      Map<String, Member> members) {
-        super(name, parent, scopeContainer, serviceInterfaces, objectFactory, eagerInit, initInvoker, destroyInvoker, injectors, members, null);
+        super(name,
+            parent,
+            scopeContainer,
+            serviceInterfaces,
+            objectFactory,
+            eagerInit,
+            initInvoker,
+            destroyInvoker,
+            injectors,
+            members,
+            null);
         scope = Scope.MODULE;
     }
 
@@ -78,13 +98,13 @@
     }
 
     protected Injector createInjector(Member member, OutboundWire wire) {
-        assert(wire instanceof SystemOutboundWire): "wire must be an instance of " + SystemOutboundWire.class.getName();
+        assert wire instanceof SystemOutboundWire : "wire must be an instance of " + SystemOutboundWire.class.getName();
         SystemOutboundWire systemWire = (SystemOutboundWire) wire;
         ObjectFactory<?> factory = new SystemWireObjectFactory(systemWire);
         if (member instanceof Field) {
-            return new FieldInjector(((Field) member), factory);
+            return new FieldInjector((Field) member, factory);
         } else if (member instanceof Method) {
-            return new MethodInjector(((Method) member), factory);
+            return new MethodInjector((Method) member, factory);
         } else {
             InvalidAccessorException e = new InvalidAccessorException("Member must be a field or method");
             e.setIdentifier(member.getName());
@@ -92,10 +112,10 @@
         }
     }
 
-    protected Injector createMultiplicityInjector(Member member, Class<?> interfaceType, List<OutboundWire> wireFactories) {
+    protected Injector createMultiplicityInjector(Member member, Class<?> interfaceType, List<OutboundWire> wires) {
         List<ObjectFactory<?>> factories = new ArrayList<ObjectFactory<?>>();
-        for (OutboundWire wire : wireFactories) {
-            assert(wire instanceof SystemOutboundWire): "wire must be an instance of " + SystemOutboundWire.class.getName();
+        for (OutboundWire wire : wires) {
+            assert wire instanceof SystemOutboundWire : "wire must be a "  + SystemOutboundWire.class.getName();
             SystemOutboundWire systemWire = (SystemOutboundWire) wire;
             factories.add(new SystemWireObjectFactory(systemWire));
         }

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemCompositeComponent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemCompositeComponent.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemCompositeComponent.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemCompositeComponent.java Sat Jun 17 10:28:07 2006
@@ -3,21 +3,22 @@
 import org.apache.tuscany.core.component.AutowireComponent;
 
 /**
- * Marker type for a specialized composite component. System composites are used by the runtime to manage
- * system components that offer services used by the runtime
+ * Marker type for a specialized composite component. System composites are used by the runtime to manage system
+ * components that offer services used by the runtime
  *
  * @version $Rev$ $Date$
  */
 public interface SystemCompositeComponent<T> extends AutowireComponent<T> {
 
     /**
-     * Register a simple Java Object as a system component. This is primarily intended for use by bootstrap
-     * code to create the initial configuration components.
+     * Register a simple Java Object as a system component. This is primarily intended for use by bootstrap code to
+     * create the initial configuration components.
      *
      * @param name     the name of the resulting component
      * @param service  the service interface the component should expose
      * @param instance the Object that will become the component's implementation
      * @throws ObjectRegistrationException
      */
-    <S, I extends S> void registerJavaObject(String name, Class<S> service, I instance) throws ObjectRegistrationException;
+    <S, I extends S> void registerJavaObject(String name, Class<S> service, I instance)
+        throws ObjectRegistrationException;
 }

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemCompositeComponentImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemCompositeComponentImpl.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemCompositeComponentImpl.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemCompositeComponentImpl.java Sat Jun 17 10:28:07 2006
@@ -6,20 +6,21 @@
 import org.apache.tuscany.spi.component.CompositeComponent;
 
 /**
- * Implements an composite context for system components. In addition, it implements an autowire policy A
- * system context may contain child composite contexts but an entry point in a child context will only be
- * outwardly accessible if there is an entry point that exposes it configured in the top-level system
- * context.
+ * Implements an composite context for system components. In addition, it implements an autowire policy A system context
+ * may contain child composite contexts but an entry point in a child context will only be outwardly accessible if there
+ * is an entry point that exposes it configured in the top-level system context.
  *
  * @version $Rev$ $Date$
  */
-public class SystemCompositeComponentImpl<S> extends AbstractCompositeComponent<S> implements SystemCompositeComponent<S> {
+public class SystemCompositeComponentImpl<S> extends AbstractCompositeComponent<S>
+    implements SystemCompositeComponent<S> {
 
     public SystemCompositeComponentImpl(String name, CompositeComponent parent, AutowireComponent autowireContext) {
         super(name, parent, autowireContext, null);
     }
 
-    public <S, I extends S> void registerJavaObject(String name, Class<S> service, I instance) throws ObjectRegistrationException {
+    public <S, I extends S> void registerJavaObject(String name, Class<S> service, I instance)
+        throws ObjectRegistrationException {
         register(new SystemSingletonAtomicComponent<S, I>(name, this, service, instance));
     }
 

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemReferenceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemReferenceImpl.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemReferenceImpl.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemReferenceImpl.java Sat Jun 17 10:28:07 2006
@@ -15,8 +15,7 @@
 import org.apache.tuscany.spi.wire.WireInvocationHandler;
 
 /**
- * Default implementation of a reference context configured with the {@link
- * org.apache.tuscany.core.system.model.SystemBinding}
+ * Default implementation of a reference configured with the {@link org.apache.tuscany.core.system.model.SystemBinding}
  *
  * @version $Rev$ $Date$
  */
@@ -29,7 +28,7 @@
 
     public SystemReferenceImpl(String name, Class<T> referenceInterface, CompositeComponent parent) {
         super(name, parent);
-        assert (referenceInterface != null) : "ReferenceDefinition interface was null";
+        assert referenceInterface != null : "ReferenceDefinition interface was null";
         this.referenceInterface = referenceInterface;
     }
 
@@ -38,7 +37,7 @@
     }
 
     public void setInboundWire(InboundWire<T> wire) {
-        assert(wire instanceof SystemInboundWire): "wire must be a " + SystemInboundWire.class.getName();
+        assert wire instanceof SystemInboundWire : "Wire must be a " + SystemInboundWire.class.getName();
         this.inboundWire = (SystemInboundWire<T>) wire;
     }
 
@@ -51,7 +50,7 @@
     }
 
     public void setOutboundWire(OutboundWire<T> wire) {
-        assert(wire instanceof SystemOutboundWire): "wire must be a " + SystemOutboundWire.class.getName();
+        assert wire instanceof SystemOutboundWire : "wire must be a " + SystemOutboundWire.class.getName();
         this.outboundWire = (SystemOutboundWire<T>) wire;
     }
 
@@ -65,7 +64,9 @@
 
     public void prepare() {
         for (InboundInvocationChain chain : inboundWire.getInvocationChains().values()) {
-            chain.setTargetInvoker(createTargetInvoker(outboundWire.getTargetName().getQualifiedName(), chain.getMethod()));
+            TargetInvoker targetInvoker = createTargetInvoker(outboundWire.getTargetName().getQualifiedName(),
+                chain.getMethod());
+            chain.setTargetInvoker(targetInvoker);
             chain.build();
         }
     }

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemServiceImpl.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemServiceImpl.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemServiceImpl.java Sat Jun 17 10:28:07 2006
@@ -34,7 +34,7 @@
     }
 
     public void setInboundWire(InboundWire<T> wire) {
-        assert(wire instanceof SystemInboundWire): "wire must be a " + SystemInboundWire.class.getName();
+        assert wire instanceof SystemInboundWire : "wire must be a " + SystemInboundWire.class.getName();
         this.inboundWire = (SystemInboundWire<T>) wire;
     }
 
@@ -43,7 +43,7 @@
     }
 
     public void setOutboundWire(OutboundWire<T> wire) {
-        assert(wire instanceof SystemOutboundWire): "wire must be a " + SystemOutboundWire.class.getName();
+        assert wire instanceof SystemOutboundWire : "wire must be a " + SystemOutboundWire.class.getName();
         this.outboundWire = (SystemOutboundWire<T>) wire;
     }
 

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemSingletonAtomicComponent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemSingletonAtomicComponent.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemSingletonAtomicComponent.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/component/SystemSingletonAtomicComponent.java Sat Jun 17 10:28:07 2006
@@ -15,21 +15,21 @@
 import org.apache.tuscany.spi.wire.TargetInvoker;
 
 /**
- * An {@link org.apache.tuscany.spi.component.AtomicComponent} used when registering objects directly into a
- * composite
+ * An {@link org.apache.tuscany.spi.component.AtomicComponent} used when registering objects directly into a composite
  *
  * @version $$Rev$$ $$Date$$
  */
-public class SystemSingletonAtomicComponent<S, T extends S> extends AbstractSCAObject<S> implements SystemAtomicComponent<S> {
+public class SystemSingletonAtomicComponent<S, T extends S> extends AbstractSCAObject<S>
+    implements SystemAtomicComponent<S> {
 
     private T instance;
     private List<Class<?>> serviceInterfaces;
 
-    public SystemSingletonAtomicComponent(String name, CompositeComponent<?> parent, Class<S> serviceInterface, T instance) {
+    public SystemSingletonAtomicComponent(String name, CompositeComponent<?> parent, Class<S> interfaze, T instance) {
         super(name, parent);
         this.instance = instance;
         serviceInterfaces = new ArrayList<Class<?>>(1);
-        serviceInterfaces.add(serviceInterface);
+        serviceInterfaces.add(interfaze);
     }
 
     public List<Class<?>> getServiceInterfaces() {

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/loader/SystemBindingLoader.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/loader/SystemBindingLoader.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/loader/SystemBindingLoader.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/loader/SystemBindingLoader.java Sat Jun 17 10:28:07 2006
@@ -33,7 +33,8 @@
  * @version $Rev$ $Date$
  */
 public class SystemBindingLoader extends LoaderExtension<SystemBinding> {
-    public static final QName SYSTEM_BINDING = new QName("http://tuscany.apache.org/xmlns/system/0.9", "binding.system");
+    public static final QName SYSTEM_BINDING =
+        new QName("http://tuscany.apache.org/xmlns/system/0.9", "binding.system");
 
     public SystemBindingLoader() {
     }
@@ -46,7 +47,8 @@
         return SYSTEM_BINDING;
     }
 
-    public SystemBinding load(XMLStreamReader reader, DeploymentContext deploymentContext) throws XMLStreamException, LoaderException {
+    public SystemBinding load(XMLStreamReader reader, DeploymentContext deploymentContext)
+        throws XMLStreamException, LoaderException {
         StAXUtil.skipToEndElement(reader);
         return new SystemBinding();
     }

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/loader/SystemComponentTypeLoader.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/loader/SystemComponentTypeLoader.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/loader/SystemComponentTypeLoader.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/loader/SystemComponentTypeLoader.java Sat Jun 17 10:28:07 2006
@@ -48,8 +48,7 @@
     }
 
     protected PojoComponentType loadByIntrospection(SystemImplementation implementation) {
-        PojoComponentType componentType = new PojoComponentType();
-        return componentType;
+        return new PojoComponentType();
     }
 
 

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/loader/SystemCompositeComponentTypeLoader.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/loader/SystemCompositeComponentTypeLoader.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/loader/SystemCompositeComponentTypeLoader.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/loader/SystemCompositeComponentTypeLoader.java Sat Jun 17 10:28:07 2006
@@ -42,14 +42,16 @@
         return SystemCompositeImplementation.class;
     }
 
-    public void load(SystemCompositeImplementation implementation, DeploymentContext deploymentContext) throws LoaderException {
+    public void load(SystemCompositeImplementation implementation, DeploymentContext deploymentContext)
+        throws LoaderException {
         URL scdlLocation = implementation.getScdlLocation();
         CompositeComponentType componentType = loadFromSidefile(scdlLocation, deploymentContext);
         implementation.setComponentType(componentType);
     }
 
 
-    protected CompositeComponentType loadFromSidefile(URL url, DeploymentContext deploymentContext) throws LoaderException {
+    protected CompositeComponentType loadFromSidefile(URL url, DeploymentContext deploymentContext)
+        throws LoaderException {
         return loaderRegistry.load(url, CompositeComponentType.class, deploymentContext);
     }
 }

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/loader/SystemImplementationLoader.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/loader/SystemImplementationLoader.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/loader/SystemImplementationLoader.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/loader/SystemImplementationLoader.java Sat Jun 17 10:28:07 2006
@@ -33,6 +33,9 @@
  * @version $Rev$ $Date$
  */
 public class SystemImplementationLoader extends LoaderExtension<SystemImplementation> {
+    public static final QName SYSTEM_IMPLEMENTATION =
+        new QName("http://tuscany.apache.org/xmlns/system/0.9", "implementation.system");
+
     public SystemImplementationLoader() {
     }
 
@@ -40,13 +43,8 @@
         super(registry);
     }
 
-    public static final QName SYSTEM_IMPLEMENTATION = new QName("http://tuscany.apache.org/xmlns/system/0.9", "implementation.system");
-
-    protected QName getXMLType() {
-        return SYSTEM_IMPLEMENTATION;
-    }
-
-    public SystemImplementation load(XMLStreamReader reader, DeploymentContext deploymentContext) throws XMLStreamException, LoaderException {
+    public SystemImplementation load(XMLStreamReader reader, DeploymentContext deploymentContext)
+        throws XMLStreamException, LoaderException {
         assert SYSTEM_IMPLEMENTATION.equals(reader.getName());
         SystemImplementation implementation = new SystemImplementation();
         String implClass = reader.getAttributeValue(null, "class");
@@ -56,4 +54,9 @@
         StAXUtil.skipToEndElement(reader);
         return implementation;
     }
+
+    protected QName getXMLType() {
+        return SYSTEM_IMPLEMENTATION;
+    }
+
 }

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/wire/SystemInboundWire.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/wire/SystemInboundWire.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/wire/SystemInboundWire.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/wire/SystemInboundWire.java Sat Jun 17 10:28:07 2006
@@ -3,8 +3,8 @@
 import org.apache.tuscany.spi.wire.InboundWire;
 
 /**
- * Specified by a {@link org.apache.tuscany.core.system.model.SystemBinding}, a specialized inbound wire that
- * returns a direct reference to the target.
+ * Specified by a {@link org.apache.tuscany.core.system.model.SystemBinding}, a specialized inbound wire that returns a
+ * direct reference to the target.
  *
  * @version $$Rev$$ $$Date$$
  */

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/wire/SystemInboundWireImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/wire/SystemInboundWireImpl.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/wire/SystemInboundWireImpl.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/wire/SystemInboundWireImpl.java Sat Jun 17 10:28:07 2006
@@ -87,7 +87,7 @@
     }
 
     public void setTargetWire(OutboundWire<T> wire) {
-        assert(wire instanceof SystemOutboundWire): "wire must be a " + SystemOutboundWireImpl.class.getName();
+        assert wire instanceof SystemOutboundWire : "wire must be a " + SystemOutboundWireImpl.class.getName();
         this.wire = (SystemOutboundWire<T>) wire;
     }
 

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/wire/SystemOutboundWire.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/wire/SystemOutboundWire.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/wire/SystemOutboundWire.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/wire/SystemOutboundWire.java Sat Jun 17 10:28:07 2006
@@ -3,8 +3,8 @@
 import org.apache.tuscany.spi.wire.OutboundWire;
 
 /**
- * Specified by a {@link org.apache.tuscany.core.system.model.SystemBinding}, a specialized outbound wire that
- * returns a direct reference to the target.
+ * Specified by a {@link org.apache.tuscany.core.system.model.SystemBinding}, a specialized outbound wire that returns a
+ * direct reference to the target.
  *
  * @version $$Rev$$ $$Date$$
  */



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message