tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmar...@apache.org
Subject svn commit: r415032 [3/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/system/wire/SystemOutboundWireImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/wire/SystemOutboundWireImpl.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/wire/SystemOutboundWireImpl.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/system/wire/SystemOutboundWireImpl.java Sat Jun 17 10:28:07 2006
@@ -79,7 +79,7 @@
     }
 
     public void setTargetWire(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.targetWire = (SystemInboundWire<T>) wire;
     }
 

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/util/JavaIntrospectionHelper.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/util/JavaIntrospectionHelper.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/util/JavaIntrospectionHelper.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/util/JavaIntrospectionHelper.java Sat Jun 17 10:28:07 2006
@@ -17,7 +17,7 @@
  *
  * @version $Rev$ $Date$
  */
-public class JavaIntrospectionHelper {
+public final class JavaIntrospectionHelper {
 
     private static final Class[] EMPTY_CLASS_ARRY = new Class[0];
 
@@ -71,8 +71,7 @@
 //        Field[] declaredFields = clazz.getFields();
         for (Field field : declaredFields) {
             int modifiers = field.getModifiers();
-            if ((Modifier.isPublic(modifiers) || Modifier.isProtected(modifiers)) && !Modifier.isStatic(modifiers))
-            {
+            if ((Modifier.isPublic(modifiers) || Modifier.isProtected(modifiers)) && !Modifier.isStatic(modifiers)) {
                 field.setAccessible(true); // ignore Java accessibility
                 fields.add(field);
             }
@@ -81,10 +80,10 @@
     }
 
     /**
-     * Returns a collection of public, private, protected, or default methods declared by a class or one of
-     * its supertypes. Note that overriden methods will not be returned in the collection (i.e. only the
-     * method override will be). <p/> This method can potentially be expensive as reflection information is
-     * not cached. It is assumed that this method will be used during a configuration phase.
+     * Returns a collection of public, private, protected, or default methods declared by a class or one of its
+     * supertypes. Note that overriden methods will not be returned in the collection (i.e. only the method override
+     * will be). <p/> This method can potentially be expensive as reflection information is not cached. It is assumed
+     * that this method will be used during a configuration phase.
      */
     public static Set<Method> getAllUniqueMethods(Class clazz) {
         return getAllUniqueMethods(clazz, new HashSet<Method>());
@@ -144,7 +143,7 @@
                 if (field.getType().equals(type)) {
                     return field; // exact match
                 } else if (field.getType().isAssignableFrom(type)
-                        || (field.getType().isPrimitive() && primitiveAssignable(field.getType(), type))) {
+                    || (field.getType().isPrimitive() && primitiveAssignable(field.getType(), type))) {
                     // We could have the situation where a field parameter is a primitive and the demarshalled value is
                     // an object counterpart (e.g. Integer and int)
                     // @spec issue
@@ -162,8 +161,8 @@
     }
 
     /**
-     * Finds the closest matching method with the given name, that is, a method taking the exact parameter
-     * types or, alternately, parameter supertypes.
+     * Finds the closest matching method with the given name, that is, a method taking the exact parameter types or,
+     * alternately, parameter supertypes.
      *
      * @param name    the name of the method
      * @param types   the method parameter types
@@ -208,17 +207,17 @@
     }
 
     /**
-     * Searches a collection of fields for one that matches by name and has a multiplicity type. i.e. a List
-     * or Array of interfaces
+     * Searches a collection of fields for one that matches by name and has a multiplicity type. i.e. a List or Array of
+     * interfaces
      *
      * @return a matching field or null
      */
     public static Field findMultiplicityFieldByName(String name, Set<Field> fields) {
         for (Field candidate : fields) {
             if (candidate.getName().equals(name)
-                    && (List.class.isAssignableFrom(candidate.getType()) || (candidate.getType().isArray()
-                    && candidate.getType().getComponentType() != null && candidate.getType().getComponentType()
-                    .isInterface()))) {
+                && (List.class.isAssignableFrom(candidate.getType()) || (candidate.getType().isArray()
+                && candidate.getType().getComponentType() != null && candidate.getType().getComponentType()
+                .isInterface()))) {
                 return candidate;
             }
         }
@@ -226,19 +225,19 @@
     }
 
     /**
-     * Searches a collection of method for one that matches by name and has single parameter of a multiplicity
-     * type. i.e. a List or Array of interfaces
+     * Searches a collection of method for one that matches by name and has single parameter of a multiplicity type.
+     * i.e. a List or Array of interfaces
      *
      * @return a matching method or null
      */
     public static Method findMultiplicityMethodByName(String name, Set<Method> methods) {
         for (Method candidate : methods) {
             if (candidate.getName().equals(name)
-                    && candidate.getParameterTypes().length == 1
-                    && (List.class.isAssignableFrom(candidate.getParameterTypes()[0]) || (candidate.getParameterTypes()[0]
-                    .isArray()
-                    && candidate.getParameterTypes()[0].getComponentType() != null && candidate.getParameterTypes()[0]
-                    .getComponentType().isInterface()))) {
+                && candidate.getParameterTypes().length == 1
+                && (List.class.isAssignableFrom(candidate.getParameterTypes()[0])
+                || (candidate.getParameterTypes()[0].isArray()
+                && candidate.getParameterTypes()[0].getComponentType() != null
+                && candidate.getParameterTypes()[0].getComponentType().isInterface()))) {
                 return candidate;
             }
         }
@@ -246,9 +245,9 @@
     }
 
     /**
-     * Returns a field or method defined in the given class or its superclasses matching a literal name and
-     * parameter types <p/> This method can potentially be expensive as reflection information is not cached.
-     * It is assumed that this method will be used during a configuration phase.
+     * Returns a field or method defined in the given class or its superclasses matching a literal name and parameter
+     * types <p/> This method can potentially be expensive as reflection information is not cached. It is assumed that
+     * this method will be used during a configuration phase.
      *
      * @param clazz       the class to introspect
      * @param propertName the literal name of the property (i.e. JavaBean conventions are not applied)
@@ -286,8 +285,8 @@
     }
 
     /**
-     * Determines if two methods "match" - that is, they have the same method names and exact parameter types
-     * (one is not a supertype of the other)
+     * Determines if two methods "match" - that is, they have the same method names and exact parameter types (one is
+     * not a supertype of the other)
      */
     public static boolean exactMethodMatch(Method method1, Method method2) {
         if (!method1.getName().equals(method2.getName())) {
@@ -337,30 +336,33 @@
     }
 
     public static boolean isImmutable(Class clazz) {
-        return (String.class == clazz || clazz.isPrimitive() || Number.class.isAssignableFrom(clazz)
-                || Boolean.class.isAssignableFrom(clazz) || Character.class.isAssignableFrom(clazz) || Byte.class
-                .isAssignableFrom(clazz));
+        return String.class == clazz
+            || clazz.isPrimitive()
+            || Number.class.isAssignableFrom(clazz)
+            || Boolean.class.isAssignableFrom(clazz)
+            || Character.class.isAssignableFrom(clazz)
+            || Byte.class.isAssignableFrom(clazz);
     }
 
     /**
-     * Takes a property name and converts it to a getter method name according to JavaBean conventions. For
-     * example, property <code>foo<code> is returned as <code>getFoo</code>
+     * Takes a property name and converts it to a getter method name according to JavaBean conventions. For example,
+     * property <code>foo<code> is returned as <code>getFoo</code>
      */
     public static String toGetter(String name) {
         return "get" + name.toUpperCase().substring(0, 1) + name.substring(1);
     }
 
     /**
-     * Takes a setter or getter method name and converts it to a property name according to JavaBean
-     * conventions. For example, <code>setFoo(var)</code> is returned as property <code>foo<code>
+     * Takes a setter or getter method name and converts it to a property name according to JavaBean conventions. For
+     * example, <code>setFoo(var)</code> is returned as property <code>foo<code>
      */
     public static String toPropertyName(String name) {
         return Character.toLowerCase(name.charAt(3)) + name.substring(4);
     }
 
     /**
-     * Takes a property name and converts it to a setter method name according to JavaBean conventions. For
-     * example, the property <code>foo<code> is returned as <code>setFoo(var)</code>
+     * Takes a property name and converts it to a setter method name according to JavaBean conventions. For example, the
+     * property <code>foo<code> is returned as <code>setFoo(var)</code>
      */
     public static String toSetter(String name) {
         return "set" + name.toUpperCase().substring(0, 1) + name.substring(1);
@@ -371,46 +373,43 @@
      */
     private static boolean primitiveAssignable(Class memberType, Class param) {
         if (memberType == Integer.class) {
-            return (param == Integer.TYPE);
+            return param == Integer.TYPE;
         } else if (memberType == Double.class) {
-            return (param == Double.TYPE);
+            return param == Double.TYPE;
         } else if (memberType == Float.class) {
-            return (param == Float.TYPE);
+            return param == Float.TYPE;
         } else if (memberType == Short.class) {
-            return (param == Short.TYPE);
+            return param == Short.TYPE;
         } else if (memberType == Character.class) {
-            return (param == Character.TYPE);
+            return param == Character.TYPE;
         } else if (memberType == Boolean.class) {
-            return (param == Boolean.TYPE);
+            return param == Boolean.TYPE;
         } else if (memberType == Byte.class) {
-            return (param == Byte.TYPE);
+            return param == Byte.TYPE;
         } else if (param == Integer.class) {
-            return (memberType == Integer.TYPE);
+            return memberType == Integer.TYPE;
         } else if (param == Double.class) {
-            return (memberType == Double.TYPE);
+            return memberType == Double.TYPE;
         } else if (param == Float.class) {
-            return (memberType == Float.TYPE);
+            return memberType == Float.TYPE;
         } else if (param == Short.class) {
-            return (memberType == Short.TYPE);
+            return memberType == Short.TYPE;
         } else if (param == Character.class) {
-            return (memberType == Character.TYPE);
+            return memberType == Character.TYPE;
         } else if (param == Boolean.class) {
-            return (memberType == Boolean.TYPE);
+            return memberType == Boolean.TYPE;
         } else if (param == Byte.class) {
-            return (memberType == Byte.TYPE);
+            return memberType == Byte.TYPE;
         } else {
             return false;
         }
     }
 
     /**
-     * Returns the generic types represented in the given type. Usage as follows:
+     * Returns the generic types represented in the given type. Usage as follows: <code>
+     * JavaIntrospectionHelper.getGenerics(field.getGenericType());
      * <p/>
-     * <code> // to return the generic type of a field: JavaIntrospectionHelper.getGenerics(field.getGenericType());
-     * <p/>
-     * // to return the generic types for the first parameter of a method: JavaIntrospectionHelper.getGenerics(m.getGenericParameterTypes()[0];);
-     * <p/>
-     * </code>
+     * JavaIntrospectionHelper.getGenerics(m.getGenericParameterTypes()[0];); </code>
      *
      * @return the generic types in order of declaration or an empty array if the type is not genericized
      */
@@ -437,7 +436,7 @@
      * will return Baz.
      */
     public static Class introspectGeneric(Class<?> clazz, int pos) {
-        assert(clazz != null): "No class specified";
+        assert clazz != null : "No class specified";
         Type type = clazz.getGenericSuperclass();
         if (type instanceof ParameterizedType) {
             Type[] args = ((ParameterizedType) type).getActualTypeArguments();
@@ -448,7 +447,7 @@
         } else {
             Type[] interfaces = clazz.getGenericInterfaces();
             for (Type itype : interfaces) {
-                if (! (itype instanceof ParameterizedType)) {
+                if (!(itype instanceof ParameterizedType)) {
                     continue;
                 }
                 ParameterizedType interfaceType = (ParameterizedType) itype;

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/util/MethodHashMap.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/util/MethodHashMap.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/util/MethodHashMap.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/util/MethodHashMap.java Sat Jun 17 10:28:07 2006
@@ -23,9 +23,8 @@
 
 /**
  * A <code>Map</code> implementation that performs a lookup on a collection of methods by method name. This
- * implementation is used to map methods on one interface to compatible methods on another interface, for
- * example, when flowing an invocation from a proxy injected on a source reference to a target service
- * instance.
+ * implementation is used to map methods on one interface to compatible methods on another interface, for example, when
+ * flowing an invocation from a proxy injected on a source reference to a target service instance.
  *
  * @version $Rev$ $Date$
  */
@@ -46,7 +45,9 @@
         if (key instanceof Method) {
             Method m = (Method) key;
             //FIXME find a more efficient way to find a matching method
-            Method closestMethod = JavaIntrospectionHelper.findClosestMatchingMethod(m.getName(), m.getParameterTypes(), super.keySet());
+            Method closestMethod = JavaIntrospectionHelper.findClosestMatchingMethod(m.getName(),
+                m.getParameterTypes(),
+                super.keySet());
             return super.get(closestMethod);
         } else {
             throw new IllegalArgumentException("Key must be a method");

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/InboundInvocationChainImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/InboundInvocationChainImpl.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/InboundInvocationChainImpl.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/InboundInvocationChainImpl.java Sat Jun 17 10:28:07 2006
@@ -33,12 +33,10 @@
     }
 
     public void build() {
-        if (requestHandlers != null) {
-            if (interceptorChainHead != null) {
-                // on target-side, connect existing handlers and interceptors
-                MessageHandler messageDispatcher = new MessageDispatcher(interceptorChainHead);
-                requestHandlers.add(messageDispatcher);
-            }
+        if (requestHandlers != null && interceptorChainHead != null) {
+            // on target-side, connect existing handlers and interceptors
+            MessageHandler messageDispatcher = new MessageDispatcher(interceptorChainHead);
+            requestHandlers.add(messageDispatcher);
         }
     }
 

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/InboundWireImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/InboundWireImpl.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/InboundWireImpl.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/InboundWireImpl.java Sat Jun 17 10:28:07 2006
@@ -88,20 +88,16 @@
                 }
             }
             if (chain.getRequestHandlers() != null && !chain.getRequestHandlers().isEmpty()) {
-                if (chain.getRequestHandlers() != null) {
-                    for (MessageHandler handler : chain.getRequestHandlers()) {
-                        if (!handler.isOptimizable()) {
-                            return false;
-                        }
+                for (MessageHandler handler : chain.getRequestHandlers()) {
+                    if (!handler.isOptimizable()) {
+                        return false;
                     }
                 }
             }
             if (chain.getResponseHandlers() != null && !chain.getResponseHandlers().isEmpty()) {
-                if (chain.getResponseHandlers() != null) {
-                    for (MessageHandler handler : chain.getResponseHandlers()) {
-                        if (!handler.isOptimizable()) {
-                            return false;
-                        }
+                for (MessageHandler handler : chain.getResponseHandlers()) {
+                    if (!handler.isOptimizable()) {
+                        return false;
                     }
                 }
             }

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/InvocationChainImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/InvocationChainImpl.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/InvocationChainImpl.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/InvocationChainImpl.java Sat Jun 17 10:28:07 2006
@@ -50,7 +50,7 @@
     protected Interceptor targetInterceptorChainHead;
 
     public InvocationChainImpl(Method operation) {
-        assert (operation != null) : "No operation type specified";
+        assert operation != null : "No operation type specified";
         this.operation = operation;
     }
 

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/InvokerInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/InvokerInterceptor.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/InvokerInterceptor.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/InvokerInterceptor.java Sat Jun 17 10:28:07 2006
@@ -19,9 +19,9 @@
 import org.apache.tuscany.spi.wire.TargetInvoker;
 
 /**
- * Serves as a tail interceptor on a target wire chain. This implementation dispatches to the target invoker
- * passed inside the wire message. Target invokers are passed from the source in order to allow for caching of
- * target instances.
+ * Serves as a tail interceptor on a target wire chain. This implementation dispatches to the target invoker passed
+ * inside the wire message. Target invokers are passed from the source in order to allow for caching of target
+ * instances.
  *
  * @version $Rev$ $Date$
  * @see org.apache.tuscany.spi.wire.TargetInvoker

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/MessageChannelImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/MessageChannelImpl.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/MessageChannelImpl.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/MessageChannelImpl.java Sat Jun 17 10:28:07 2006
@@ -42,8 +42,8 @@
     }
 
     /**
-     * Send a message down the channel. The message will be processed by all handlers in order until one
-     * returns false to indicate processing is complete or all handlers have been called.
+     * Send a message down the channel. The message will be processed by all handlers in order until one returns false
+     * to indicate processing is complete or all handlers have been called.
      *
      * @param msg a Message to send down the channel
      */

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/MessageDispatcher.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/MessageDispatcher.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/MessageDispatcher.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/MessageDispatcher.java Sat Jun 17 10:28:07 2006
@@ -21,8 +21,8 @@
 import org.apache.tuscany.spi.wire.MessageHandler;
 
 /**
- * A message handler that dispatches the message through an interceptor stack and the uses the response
- * channel to return the result.
+ * A message handler that dispatches the message through an interceptor stack and the uses the response channel to
+ * return the result.
  *
  * @version $Rev$ $Date$
  */

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/OutboundInvocationChainImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/OutboundInvocationChainImpl.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/OutboundInvocationChainImpl.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/OutboundInvocationChainImpl.java Sat Jun 17 10:28:07 2006
@@ -48,7 +48,7 @@
 
         if (requestHandlers != null || responseHandlers != null) {
             Interceptor channelInterceptor = new RequestResponseInterceptor(requestChannel, targetRequestChannel,
-                    responseChannel, targetResponseChannel);
+                responseChannel, targetResponseChannel);
             if (interceptorChainHead != null) {
                 interceptorChainTail.setNext(channelInterceptor);
             } else {
@@ -64,7 +64,7 @@
                 } else if (!(interceptorChainTail instanceof InvokerInterceptor)) {
                     // Connect source interceptor chain to the target request channel
                     Interceptor channelInterceptor = new RequestResponseInterceptor(null, targetRequestChannel, null,
-                            targetResponseChannel);
+                        targetResponseChannel);
                     interceptorChainTail.setNext(channelInterceptor);
                 }
             } else {
@@ -74,7 +74,7 @@
                     interceptorChainTail = targetInterceptorChainHead;
                 } else {
                     Interceptor channelInterceptor = new RequestResponseInterceptor(null, targetRequestChannel, null,
-                            targetResponseChannel);
+                        targetResponseChannel);
                     interceptorChainHead = channelInterceptor;
                     interceptorChainTail = channelInterceptor;
                 }

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/OutboundWireImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/OutboundWireImpl.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/OutboundWireImpl.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/OutboundWireImpl.java Sat Jun 17 10:28:07 2006
@@ -99,7 +99,7 @@
     public boolean isOptimizable() {
         for (OutboundInvocationChain chain : invocationChains.values()) {
             if (chain.getHeadInterceptor() != null || !chain.getRequestHandlers().isEmpty()
-                    || !chain.getResponseHandlers().isEmpty()) {
+                || !chain.getResponseHandlers().isEmpty()) {
                 Interceptor current = chain.getHeadInterceptor();
                 while (current != null && current != chain.getTargetInterceptor()) {
                     if (!current.isOptimizable()) {

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/PojoTargetInvoker.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/PojoTargetInvoker.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/PojoTargetInvoker.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/PojoTargetInvoker.java Sat Jun 17 10:28:07 2006
@@ -12,8 +12,8 @@
 import org.apache.tuscany.spi.wire.TargetInvoker;
 
 /**
- * Base class for dispatching to a Java based component implementation. Subclasses implement a strategy for
- * resolving implementation instances.
+ * Base class for dispatching to a Java based component implementation. Subclasses implement a strategy for resolving
+ * implementation instances.
  *
  * @version $Rev$ $Date$
  */
@@ -23,7 +23,7 @@
     protected boolean cacheable;
 
     public PojoTargetInvoker(Method operation) {
-        assert (operation != null) : "Operation method cannot be null";
+        assert operation != null : "Operation method cannot be null";
         this.operation = operation;
     }
 
@@ -32,10 +32,11 @@
             Object instance = getInstance();
             if (!operation.getDeclaringClass().isInstance(instance)) {
                 Set<Method> methods = JavaIntrospectionHelper.getAllUniqueMethods(instance.getClass());
-                Method newOperation = JavaIntrospectionHelper.findClosestMatchingMethod(operation.getName(), operation
-                        .getParameterTypes(), methods);
-                if (newOperation != null)
+                Method newOperation = JavaIntrospectionHelper.findClosestMatchingMethod(operation.getName(),
+                    operation.getParameterTypes(), methods);
+                if (newOperation != null) {
                     operation = newOperation;
+                }
             }
             if (payload != null && !payload.getClass().isArray()) {
                 return operation.invoke(instance, payload);
@@ -59,8 +60,6 @@
         return msg;
     }
 
-    protected abstract Object getInstance() throws TargetException;
-
     public void setNext(Interceptor next) {
         throw new IllegalStateException("This interceptor must be the last interceptor in an interceptor chain");
     }
@@ -87,4 +86,7 @@
             return null; // will not happen
         }
     }
+
+    protected abstract Object getInstance() throws TargetException;
+
 }

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/RequestResponseInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/RequestResponseInterceptor.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/RequestResponseInterceptor.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/RequestResponseInterceptor.java Sat Jun 17 10:28:07 2006
@@ -21,8 +21,8 @@
 import org.apache.tuscany.spi.wire.MessageChannel;
 
 /**
- * An interceptor that first sends a message down its request channel then extracts the response from the
- * message and sends it down the response channel before returning it up the interceptor stack.
+ * An interceptor that first sends a message down its request channel then extracts the response from the message and
+ * sends it down the response channel before returning it up the interceptor stack.
  *
  * @version $Rev$ $Date$
  */

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/StaticPojoTargetInvoker.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/StaticPojoTargetInvoker.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/StaticPojoTargetInvoker.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/StaticPojoTargetInvoker.java Sat Jun 17 10:28:07 2006
@@ -19,8 +19,8 @@
 import java.lang.reflect.Method;
 
 /**
- * Caches component instances that do not need to be resolved for every wire, e.g. an wire originating from a
- * lesser scope intended for a target with a wider scope
+ * Caches component instances that do not need to be resolved for every wire, e.g. an wire originating from a lesser
+ * scope intended for a target with a wider scope
  *
  * @version $Rev$ $Date$
  */
@@ -30,7 +30,7 @@
 
     public StaticPojoTargetInvoker(Method operation, Object instance) {
         super(operation);
-        assert (instance != null) : "Instance cannot be null";
+        assert instance != null : "Instance cannot be null";
         this.instance = instance;
     }
 

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/jdk/JDKInboundInvocationHandler.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/jdk/JDKInboundInvocationHandler.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/jdk/JDKInboundInvocationHandler.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/jdk/JDKInboundInvocationHandler.java Sat Jun 17 10:28:07 2006
@@ -16,8 +16,8 @@
 import org.apache.tuscany.spi.wire.WireInvocationHandler;
 
 /**
- * Receives a request from a proxy and performs an invocation on an {@link org.apache.tuscany.spi.wire.InboundWire}
- * via an {@link InboundInvocationChain}
+ * Receives a request from a proxy and performs an invocation on an {@link org.apache.tuscany.spi.wire.InboundWire} via
+ * an {@link InboundInvocationChain}
  *
  * @version $Rev$ $Date$
  */
@@ -118,8 +118,8 @@
     }
 
     /**
-     * A holder used to associate an wire chain with a local copy of a target invoker that was previously
-     * cloned from the chain master
+     * A holder used to associate an wire chain with a local copy of a target invoker that was previously cloned from
+     * the chain master
      */
     private class ChainHolder {
 

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/jdk/JDKOutboundInvocationHandler.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/jdk/JDKOutboundInvocationHandler.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/jdk/JDKOutboundInvocationHandler.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/jdk/JDKOutboundInvocationHandler.java Sat Jun 17 10:28:07 2006
@@ -31,8 +31,8 @@
 import org.apache.tuscany.spi.wire.WireInvocationHandler;
 
 /**
- * Receives a request from a proxy and performs an invocation on an {@link org.apache.tuscany.spi.wire.OutboundWire}
- * via an {@link org.apache.tuscany.spi.wire.OutboundInvocationChain}
+ * Receives a request from a proxy and performs an invocation on an {@link org.apache.tuscany.spi.wire.OutboundWire} via
+ * an {@link org.apache.tuscany.spi.wire.OutboundInvocationChain}
  *
  * @version $Rev$ $Date$
  */
@@ -88,7 +88,7 @@
             invoker = chain.getTargetInvoker();
         }
         if (chain.getTargetRequestChannel() == null && chain.getTargetResponseChannel() == null
-                && headInterceptor == null) {
+            && headInterceptor == null) {
             try {
                 // short-circuit the dispatch and invoke the target directly
                 if (chain.getTargetInvoker() == null) {
@@ -135,8 +135,8 @@
     }
 
     /**
-     * A holder used to associate an wire chain with a local copy of a target invoker that was previously
-     * cloned from the chain master
+     * A holder used to associate an wire chain with a local copy of a target invoker that was previously cloned from
+     * the chain master
      */
     private class ChainHolder {
 

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/jdk/JDKWireService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/jdk/JDKWireService.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/jdk/JDKWireService.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/main/java/org/apache/tuscany/core/wire/jdk/JDKWireService.java Sat Jun 17 10:28:07 2006
@@ -2,6 +2,9 @@
 
 import java.lang.reflect.Proxy;
 
+import org.osoa.sca.annotations.Init;
+import org.osoa.sca.annotations.Scope;
+
 import org.apache.tuscany.spi.annotation.Autowire;
 import org.apache.tuscany.spi.policy.PolicyBuilderRegistry;
 import org.apache.tuscany.spi.wire.InboundWire;
@@ -10,8 +13,6 @@
 import org.apache.tuscany.spi.wire.RuntimeWire;
 import org.apache.tuscany.spi.wire.WireInvocationHandler;
 import org.apache.tuscany.spi.wire.WireService;
-import org.osoa.sca.annotations.Init;
-import org.osoa.sca.annotations.Scope;
 
 /**
  * @version $$Rev$$ $$Date$$
@@ -19,18 +20,18 @@
 @Scope("MODULE")
 public class JDKWireService implements WireService {
 
-    private PolicyBuilderRegistry policyRegistry;
+    //private PolicyBuilderRegistry policyRegistry;
 
     public JDKWireService() {
     }
 
     public JDKWireService(PolicyBuilderRegistry policyRegistry) {
-        this.policyRegistry = policyRegistry;
+        //this.policyRegistry = policyRegistry;
     }
 
     @Autowire
     public void setPolicyRegistry(PolicyBuilderRegistry policyRegistry) {
-        this.policyRegistry = policyRegistry;
+        //this.policyRegistry = policyRegistry;
     }
 
     @Init(eager = true)
@@ -39,17 +40,19 @@
 
 
     public <T> T createProxy(RuntimeWire<T> wire) throws ProxyCreationException {
-        assert(wire != null): "WireDefinition was null";
+        assert wire != null : "WireDefinition was null";
         if (wire instanceof InboundWire) {
             InboundWire<T> inbound = (InboundWire<T>) wire;
             JDKInboundInvocationHandler handler = new JDKInboundInvocationHandler(inbound.getInvocationChains());
             Class<T> interfaze = inbound.getBusinessInterface();
-            return interfaze.cast(Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class[]{interfaze}, handler));
+            return interfaze.cast(Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
+                new Class[]{interfaze}, handler));
         } else if (wire instanceof OutboundWire) {
             OutboundWire<T> inbound = (OutboundWire<T>) wire;
             JDKOutboundInvocationHandler handler = new JDKOutboundInvocationHandler(inbound.getInvocationChains());
             Class<T> interfaze = inbound.getBusinessInterface();
-            return interfaze.cast(Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class[]{interfaze}, handler));
+            return interfaze.cast(Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
+                new Class[]{interfaze}, handler));
         } else {
             ProxyCreationException e = new ProxyCreationException("Invalid wire type");
             e.setIdentifier(wire.getClass().getName());
@@ -58,7 +61,7 @@
     }
 
     public WireInvocationHandler createHandler(RuntimeWire<?> wire) {
-        assert(wire != null): "WireDefinition was null";
+        assert wire != null : "WireDefinition was null";
         if (wire instanceof InboundWire) {
             InboundWire<?> inbound = (InboundWire) wire;
             return new JDKInboundInvocationHandler(inbound.getInvocationChains());

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/builder/BuilderRegistryTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/builder/BuilderRegistryTestCase.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/builder/BuilderRegistryTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/builder/BuilderRegistryTestCase.java Sat Jun 17 10:28:07 2006
@@ -36,7 +36,8 @@
     public void testRegistrationWithGenerics() {
         GenerifiedBuilder builder = new GenerifiedBuilder();
         registry.register(builder);
-        ComponentDefinition<CompositeImplementation> componentDefinition = new ComponentDefinition(new CompositeImplementation());
+        ComponentDefinition<CompositeImplementation> componentDefinition
+            = new ComponentDefinition(new CompositeImplementation());
         componentDefinition.getImplementation().setComponentType(new CompositeComponentType());
         registry.build(null, componentDefinition, deploymentContext);
     }
@@ -44,7 +45,8 @@
     public void testRegistrationWithoutGenerics() {
         RawBuilder builder = new RawBuilder();
         registry.register(CompositeImplementation.class, builder);
-        ComponentDefinition<CompositeImplementation> componentDefinition = new ComponentDefinition(new CompositeImplementation());
+        ComponentDefinition<CompositeImplementation> componentDefinition
+            = new ComponentDefinition(new CompositeImplementation());
         componentDefinition.getImplementation().setComponentType(new CompositeComponentType());
         registry.build(null, componentDefinition, deploymentContext);
     }
@@ -56,14 +58,18 @@
     }
 
     public static class GenerifiedBuilder implements ComponentBuilder<CompositeImplementation> {
-        public Component<?> build(CompositeComponent<?> parent, ComponentDefinition<CompositeImplementation> componentDefinition, DeploymentContext deploymentContext) {
+        public Component<?> build(CompositeComponent<?> parent,
+                                  ComponentDefinition<CompositeImplementation> componentDefinition,
+                                  DeploymentContext deploymentContext) {
             return null;
         }
     }
 
     @SuppressWarnings({"RawUseOfParameterizedType"})
     public static class RawBuilder implements ComponentBuilder {
-        public Component build(CompositeComponent parent, ComponentDefinition componentDefinition, DeploymentContext deploymentContext) throws BuilderConfigException {
+        public Component build(CompositeComponent parent,
+                               ComponentDefinition componentDefinition,
+                               DeploymentContext deploymentContext) throws BuilderConfigException {
             return null;
         }
     }

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/builder/InboundtoOutboundConnectTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/builder/InboundtoOutboundConnectTestCase.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/builder/InboundtoOutboundConnectTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/builder/InboundtoOutboundConnectTestCase.java Sat Jun 17 10:28:07 2006
@@ -20,8 +20,8 @@
 import org.jmock.MockObjectTestCase;
 
 /**
- * Verifies connection strategies between {@link org.apache.tuscany.spi.wire.OutboundInvocationChain}s and
- * {@link org.apache.tuscany.spi.wire.InboundInvocationChain}s
+ * Verifies connection strategies between {@link org.apache.tuscany.spi.wire.OutboundInvocationChain}s and {@link
+ * org.apache.tuscany.spi.wire.InboundInvocationChain}s
  *
  * @version $$Rev$$ $$Date$$
  */

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/builder/OutboundToInboundConnectTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/builder/OutboundToInboundConnectTestCase.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/builder/OutboundToInboundConnectTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/builder/OutboundToInboundConnectTestCase.java Sat Jun 17 10:28:07 2006
@@ -21,8 +21,8 @@
 import org.jmock.MockObjectTestCase;
 
 /**
- * Verifies connection strategies between {@link org.apache.tuscany.spi.wire.OutboundInvocationChain}s and
- * {@link org.apache.tuscany.spi.wire.InboundInvocationChain}s
+ * Verifies connection strategies between {@link org.apache.tuscany.spi.wire.OutboundInvocationChain}s and {@link
+ * org.apache.tuscany.spi.wire.InboundInvocationChain}s
  *
  * @version $$Rev$$ $$Date$$
  */

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/event/EventTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/event/EventTestCase.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/event/EventTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/event/EventTestCase.java Sat Jun 17 10:28:07 2006
@@ -1,8 +1,8 @@
 package org.apache.tuscany.core.component.event;
 
-import org.jmock.MockObjectTestCase;
-import org.jmock.Mock;
 import org.apache.tuscany.spi.component.CompositeComponent;
+import org.jmock.Mock;
+import org.jmock.MockObjectTestCase;
 
 /**
  * @version $Rev$ $Date$
@@ -12,43 +12,43 @@
     private CompositeComponent component;
 
     public void testCompositeStart() {
-        CompositeStart event = new CompositeStart(this,component);
-        assertEquals(component,event.getComposite());
+        CompositeStart event = new CompositeStart(this, component);
+        assertEquals(component, event.getComposite());
     }
 
     public void testCompositeStop() {
-        CompositeStop event = new CompositeStop(this,component);
-        assertEquals(component,event.getComposite());
+        CompositeStop event = new CompositeStop(this, component);
+        assertEquals(component, event.getComposite());
     }
 
     public void testHttpSessionStart() {
         Object id = new Object();
-        HttpSessionEvent event = new HttpSessionStart(this,id);
-        assertEquals(this,event.getSource());
-        assertEquals(id,event.getId());
+        HttpSessionEvent event = new HttpSessionStart(this, id);
+        assertEquals(this, event.getSource());
+        assertEquals(id, event.getId());
     }
 
     public void testHttpSessionEnd() {
         Object id = new Object();
-        HttpSessionEvent event = new HttpSessionEnd(this,id);
-        assertEquals(this,event.getSource());
-        assertEquals(id,event.getId());
+        HttpSessionEvent event = new HttpSessionEnd(this, id);
+        assertEquals(this, event.getSource());
+        assertEquals(id, event.getId());
     }
 
     public void testRequestStart() {
         RequestStart event = new RequestStart(this);
-        assertEquals(this,event.getSource());
+        assertEquals(this, event.getSource());
     }
 
     public void testReequestEnd() {
         RequestEnd event = new RequestEnd(this);
-        assertEquals(this,event.getSource());
+        assertEquals(this, event.getSource());
     }
 
 
     protected void setUp() throws Exception {
         super.setUp();
         Mock mock = mock(CompositeComponent.class);
-        component = (CompositeComponent)mock.proxy();
+        component = (CompositeComponent) mock.proxy();
     }
 }

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/AbstractScopeContainerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/AbstractScopeContainerTestCase.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/AbstractScopeContainerTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/AbstractScopeContainerTestCase.java Sat Jun 17 10:28:07 2006
@@ -1,5 +1,6 @@
 package org.apache.tuscany.core.component.scope;
 
+import org.apache.tuscany.core.component.WorkContextImpl;
 import org.apache.tuscany.spi.component.AtomicComponent;
 import org.apache.tuscany.spi.component.WorkContext;
 import org.apache.tuscany.spi.event.Event;
@@ -7,7 +8,6 @@
 import org.apache.tuscany.spi.event.RuntimeEventListener;
 import org.apache.tuscany.spi.event.TrueFilter;
 import org.apache.tuscany.spi.model.Scope;
-import org.apache.tuscany.core.component.WorkContextImpl;
 import org.jmock.Mock;
 import org.jmock.MockObjectTestCase;
 
@@ -16,13 +16,14 @@
  */
 public class AbstractScopeContainerTestCase extends MockObjectTestCase {
 
-    public void testSetWorkContext(){
+    public void testSetWorkContext() {
         TestContainer container = new TestContainer("foo");
         WorkContext ctx = new WorkContextImpl();
         container.setWorkContext(ctx);
-        assertEquals(ctx,container.getWorkContext());
+        assertEquals(ctx, container.getWorkContext());
 
     }
+
     public void testFireListener() {
         TestContainer container = new TestContainer("foo");
         Mock mock = mock(RuntimeEventListener.class);
@@ -75,11 +76,10 @@
     }
 
 
-
     private class TestContainer extends AbstractScopeContainer {
 
         public TestContainer(String name) {
-            super(name,null);
+            super(name, null);
         }
 
         protected InstanceWrapper getInstanceWrapper(AtomicComponent component) {
@@ -98,7 +98,7 @@
 
         }
 
-        public WorkContext getWorkContext(){
+        public WorkContext getWorkContext() {
             return super.getWorkContext();
         }
     }

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/BasicHttpSessionScopeTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/BasicHttpSessionScopeTestCase.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/BasicHttpSessionScopeTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/BasicHttpSessionScopeTestCase.java Sat Jun 17 10:28:07 2006
@@ -30,10 +30,12 @@
         // start the request
         Object session = new Object();
         workContext.setIdentifier(HttpSessionScopeContainer.HTTP_IDENTIFIER, session);
-        SessionScopeInitDestroyComponent o1 = (SessionScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
+        SessionScopeInitDestroyComponent o1 =
+            (SessionScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
         assertTrue(o1.isInitialized());
         assertFalse(o1.isDestroyed());
-        SessionScopeInitDestroyComponent o2 = (SessionScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
+        SessionScopeInitDestroyComponent o2 =
+            (SessionScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
         assertSame(o1, o2);
         scopeContext.onEvent(new HttpSessionEnd(this, session));
         assertTrue(o1.isDestroyed());
@@ -49,12 +51,14 @@
 
         Object session1 = new Object();
         workContext.setIdentifier(HttpSessionScopeContainer.HTTP_IDENTIFIER, session1);
-        SessionScopeInitDestroyComponent o1 = (SessionScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
+        SessionScopeInitDestroyComponent o1 =
+            (SessionScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
         assertTrue(o1.isInitialized());
 
         Object session2 = new Object();
         workContext.setIdentifier(HttpSessionScopeContainer.HTTP_IDENTIFIER, session2);
-        SessionScopeInitDestroyComponent o2 = (SessionScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
+        SessionScopeInitDestroyComponent o2 =
+            (SessionScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
         assertNotSame(o1, o2);
 
         scopeContext.onEvent(new HttpSessionEnd(this, session1));
@@ -67,9 +71,12 @@
 
     protected void setUp() throws Exception {
         super.setUp();
-        factory = new PojoObjectFactory<SessionScopeInitDestroyComponent>(SessionScopeInitDestroyComponent.class.getConstructor((Class[]) null), null);
-        initInvoker = new MethodEventInvoker<Object>(SessionScopeInitDestroyComponent.class.getMethod("init", (Class[]) null));
-        destroyInvoker = new MethodEventInvoker<Object>(SessionScopeInitDestroyComponent.class.getMethod("destroy", (Class[]) null));
+        factory = new PojoObjectFactory<SessionScopeInitDestroyComponent>(
+            SessionScopeInitDestroyComponent.class.getConstructor((Class[]) null), null);
+        initInvoker = new MethodEventInvoker<Object>(
+            SessionScopeInitDestroyComponent.class.getMethod("init", (Class[]) null));
+        destroyInvoker = new MethodEventInvoker<Object>(
+            SessionScopeInitDestroyComponent.class.getMethod("destroy", (Class[]) null));
     }
 
     protected void tearDown() throws Exception {
@@ -77,7 +84,16 @@
     }
 
     private SystemAtomicComponent createContext(ScopeContainer scopeContainer) {
-        SystemAtomicComponentImpl context = new SystemAtomicComponentImpl("foo", null, scopeContainer, SessionScopeInitDestroyComponent.class, factory, false, initInvoker, destroyInvoker, null, null);
+        SystemAtomicComponentImpl context = new SystemAtomicComponentImpl("foo",
+            null,
+            scopeContainer,
+            SessionScopeInitDestroyComponent.class,
+            factory,
+            false,
+            initInvoker,
+            destroyInvoker,
+            null,
+            null);
         context.start();
         return context;
     }

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/BasicModuleScopeTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/BasicModuleScopeTestCase.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/BasicModuleScopeTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/BasicModuleScopeTestCase.java Sat Jun 17 10:28:07 2006
@@ -28,10 +28,12 @@
         scopeContext.start();
         SystemAtomicComponent atomicContext = createContext(scopeContext);
         // start the request
-        ModuleScopeInitDestroyComponent o1 = (ModuleScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
+        ModuleScopeInitDestroyComponent o1 =
+            (ModuleScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
         assertTrue(o1.isInitialized());
         assertFalse(o1.isDestroyed());
-        ModuleScopeInitDestroyComponent o2 = (ModuleScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
+        ModuleScopeInitDestroyComponent o2 =
+            (ModuleScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
         assertEquals(o1, o2);
         scopeContext.onEvent(new CompositeStop(this, null));
         assertTrue(o1.isDestroyed());
@@ -44,13 +46,14 @@
         scopeContext.start();
 
         SystemAtomicComponent atomicContext = createContext(scopeContext);
-        SystemAtomicComponent atomicContext2 = createContext(scopeContext);
 
-        ModuleScopeInitDestroyComponent o1 = (ModuleScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
+        ModuleScopeInitDestroyComponent o1 =
+            (ModuleScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
         assertTrue(o1.isInitialized());
         assertFalse(o1.isDestroyed());
 
-        ModuleScopeInitDestroyComponent o2 = (ModuleScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
+        ModuleScopeInitDestroyComponent o2 =
+            (ModuleScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
         assertSame(o1, o2);
         scopeContext.onEvent(new CompositeStop(this, null));
         assertTrue(o1.isDestroyed());
@@ -59,9 +62,12 @@
 
     protected void setUp() throws Exception {
         super.setUp();
-        factory = new PojoObjectFactory<ModuleScopeInitDestroyComponent>(ModuleScopeInitDestroyComponent.class.getConstructor((Class[]) null), null);
-        initInvoker = new MethodEventInvoker<Object>(ModuleScopeInitDestroyComponent.class.getMethod("init", (Class[]) null));
-        destroyInvoker = new MethodEventInvoker<Object>(ModuleScopeInitDestroyComponent.class.getMethod("destroy", (Class[]) null));
+        factory = new PojoObjectFactory<ModuleScopeInitDestroyComponent>(
+            ModuleScopeInitDestroyComponent.class.getConstructor((Class[]) null), null);
+        initInvoker = new MethodEventInvoker<Object>(ModuleScopeInitDestroyComponent.class.getMethod(
+            "init", (Class[]) null));
+        destroyInvoker = new MethodEventInvoker<Object>(ModuleScopeInitDestroyComponent.class.getMethod(
+            "destroy", (Class[]) null));
     }
 
     protected void tearDown() throws Exception {
@@ -69,7 +75,16 @@
     }
 
     private SystemAtomicComponent createContext(ScopeContainer scopeContainer) {
-        SystemAtomicComponentImpl context = new SystemAtomicComponentImpl("foo", null, scopeContainer, ModuleScopeInitDestroyComponent.class, factory, false, initInvoker, destroyInvoker, null, null);
+        SystemAtomicComponentImpl context = new SystemAtomicComponentImpl("foo",
+            null,
+            scopeContainer,
+            ModuleScopeInitDestroyComponent.class,
+            factory,
+            false,
+            initInvoker,
+            destroyInvoker,
+            null,
+            null);
         context.start();
         return context;
     }

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/BasicRequestScopeTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/BasicRequestScopeTestCase.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/BasicRequestScopeTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/BasicRequestScopeTestCase.java Sat Jun 17 10:28:07 2006
@@ -25,10 +25,12 @@
         scopeContext.start();
         SystemAtomicComponent atomicContext = createContext(scopeContext);
         // start the request
-        RequestScopeInitDestroyComponent o1 = (RequestScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
+        RequestScopeInitDestroyComponent o1 =
+            (RequestScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
         assertTrue(o1.isInitialized());
         assertFalse(o1.isDestroyed());
-        RequestScopeInitDestroyComponent o2 = (RequestScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
+        RequestScopeInitDestroyComponent o2 =
+            (RequestScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
         assertSame(o1, o2);
         scopeContext.onEvent(new RequestEnd(this));
         assertTrue(o1.isDestroyed());
@@ -41,12 +43,14 @@
 
         SystemAtomicComponent atomicContext = createContext(scopeContext);
 
-        RequestScopeInitDestroyComponent o1 = (RequestScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
+        RequestScopeInitDestroyComponent o1 =
+            (RequestScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
         assertTrue(o1.isInitialized());
         scopeContext.onEvent(new RequestEnd(this));
         assertTrue(o1.isDestroyed());
 
-        RequestScopeInitDestroyComponent o2 = (RequestScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
+        RequestScopeInitDestroyComponent o2 =
+            (RequestScopeInitDestroyComponent) scopeContext.getInstance(atomicContext);
         assertNotSame(o1, o2);
         scopeContext.onEvent(new RequestEnd(this));
         assertTrue(o2.isDestroyed());
@@ -55,9 +59,12 @@
 
     protected void setUp() throws Exception {
         super.setUp();
-        factory = new PojoObjectFactory<RequestScopeInitDestroyComponent>(RequestScopeInitDestroyComponent.class.getConstructor((Class[]) null), null);
-        initInvoker = new MethodEventInvoker<Object>(RequestScopeInitDestroyComponent.class.getMethod("init", (Class[]) null));
-        destroyInvoker = new MethodEventInvoker<Object>(RequestScopeInitDestroyComponent.class.getMethod("destroy", (Class[]) null));
+        factory = new PojoObjectFactory<RequestScopeInitDestroyComponent>(
+            RequestScopeInitDestroyComponent.class.getConstructor((Class[]) null), null);
+        initInvoker = new MethodEventInvoker<Object>(
+            RequestScopeInitDestroyComponent.class.getMethod("init", (Class[]) null));
+        destroyInvoker = new MethodEventInvoker<Object>(
+            RequestScopeInitDestroyComponent.class.getMethod("destroy", (Class[]) null));
     }
 
     protected void tearDown() throws Exception {
@@ -65,7 +72,8 @@
     }
 
     private SystemAtomicComponent createContext(ScopeContainer scopeContainer) {
-        SystemAtomicComponentImpl context = new SystemAtomicComponentImpl("foo", null, scopeContainer, RequestScopeInitDestroyComponent.class, factory, false, initInvoker, destroyInvoker, null, null);
+        SystemAtomicComponentImpl context = new SystemAtomicComponentImpl("foo", null, scopeContainer,
+            RequestScopeInitDestroyComponent.class, factory, false, initInvoker, destroyInvoker, null, null);
         context.start();
         return context;
     }

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/BasicStatelessScopeTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/BasicStatelessScopeTestCase.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/BasicStatelessScopeTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/BasicStatelessScopeTestCase.java Sat Jun 17 10:28:07 2006
@@ -23,9 +23,11 @@
         WorkContext ctx = new WorkContextImpl();
         StatelessScopeContainer scope = new StatelessScopeContainer(ctx);
         scope.start();
-        SystemAtomicComponent context1 = MockContextFactory.createSystemAtomicContext("comp1", scope, StatelessComponentImpl.class);
+        SystemAtomicComponent context1 =
+            MockContextFactory.createSystemAtomicContext("comp1", scope, StatelessComponentImpl.class);
         scope.register(context1);
-        SystemAtomicComponent context2 = MockContextFactory.createSystemAtomicContext("comp2", scope, StatelessComponentImpl.class);
+        SystemAtomicComponent context2 =
+            MockContextFactory.createSystemAtomicContext("comp2", scope, StatelessComponentImpl.class);
         scope.register(context2);
         StatelessComponentImpl comp1 = (StatelessComponentImpl) scope.getInstance(context1);
         Assert.assertNotNull(comp1);
@@ -40,11 +42,13 @@
         StatelessScopeContainer scope = new StatelessScopeContainer(ctx);
 
         scope.start();
-        SystemAtomicComponent context1 = MockContextFactory.createSystemAtomicContext("comp1", scope, StatelessComponentImpl.class);
+        SystemAtomicComponent context1 =
+            MockContextFactory.createSystemAtomicContext("comp1", scope, StatelessComponentImpl.class);
         scope.register(context1);
         StatelessComponent comp1 = (StatelessComponentImpl) scope.getInstance(context1);
         Assert.assertNotNull(comp1);
-        SystemAtomicComponent context2 = MockContextFactory.createSystemAtomicContext("comp2", scope, StatelessComponentImpl.class);
+        SystemAtomicComponent context2 =
+            MockContextFactory.createSystemAtomicContext("comp2", scope, StatelessComponentImpl.class);
         scope.register(context2);
         StatelessComponentImpl comp2 = (StatelessComponentImpl) scope.getInstance(context2);
         Assert.assertNotNull(comp2);

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/DependencyLifecycleTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/DependencyLifecycleTestCase.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/DependencyLifecycleTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/DependencyLifecycleTestCase.java Sat Jun 17 10:28:07 2006
@@ -28,8 +28,12 @@
         WorkContext ctx = new WorkContextImpl();
         ModuleScopeContainer scopeCtx = new ModuleScopeContainer(ctx);
         scopeCtx.start();
-        Map<String, AtomicComponent> contexts = MockContextFactory.createWiredContexts("source", OrderedDependentPojoImpl.class,
-                scopeCtx, "target", OrderedInitPojoImpl.class, scopeCtx);
+        Map<String, AtomicComponent> contexts = MockContextFactory.createWiredContexts("source",
+            OrderedDependentPojoImpl.class,
+            scopeCtx,
+            "target",
+            OrderedInitPojoImpl.class,
+            scopeCtx);
         for (AtomicComponent component : contexts.values()) {
             scopeCtx.register(component);
         }
@@ -52,8 +56,12 @@
         WorkContext ctx = new WorkContextImpl();
         ModuleScopeContainer scopeCtx = new ModuleScopeContainer(ctx);
         scopeCtx.start();
-        Map<String, AtomicComponent> contexts = MockContextFactory.createWiredContexts("source", OrderedDependentPojoImpl.class,
-                scopeCtx, "target", OrderedInitPojoImpl.class, scopeCtx);
+        Map<String, AtomicComponent> contexts = MockContextFactory.createWiredContexts("source",
+            OrderedDependentPojoImpl.class,
+            scopeCtx,
+            "target",
+            OrderedInitPojoImpl.class,
+            scopeCtx);
         AtomicComponent sourceComponent = contexts.get("source");
         AtomicComponent targetComponent = contexts.get("target");
         scopeCtx.onEvent(new CompositeStart(this, null));
@@ -75,8 +83,12 @@
         HttpSessionScopeContainer scopeCtx = new HttpSessionScopeContainer(ctx);
         scopeCtx.start();
         Object session = new Object();
-        Map<String, AtomicComponent> contexts = MockContextFactory.createWiredContexts("source", OrderedDependentPojoImpl.class,
-                scopeCtx, "target", OrderedInitPojoImpl.class, scopeCtx);
+        Map<String, AtomicComponent> contexts = MockContextFactory.createWiredContexts("source",
+            OrderedDependentPojoImpl.class,
+            scopeCtx,
+            "target",
+            OrderedInitPojoImpl.class,
+            scopeCtx);
         AtomicComponent sourceComponent = contexts.get("source");
         AtomicComponent targetComponent = contexts.get("target");
         scopeCtx.register(sourceComponent);
@@ -96,8 +108,12 @@
         HttpSessionScopeContainer scopeCtx = new HttpSessionScopeContainer(ctx);
         scopeCtx.start();
         Object session = new Object();
-        Map<String, AtomicComponent> contexts = MockContextFactory.createWiredContexts("source", OrderedDependentPojoImpl.class,
-                scopeCtx, "target", OrderedInitPojoImpl.class, scopeCtx);
+        Map<String, AtomicComponent> contexts = MockContextFactory.createWiredContexts("source",
+            OrderedDependentPojoImpl.class,
+            scopeCtx,
+            "target",
+            OrderedInitPojoImpl.class,
+            scopeCtx);
         AtomicComponent sourceComponent = contexts.get("source");
         AtomicComponent targetComponent = contexts.get("target");
         ctx.setIdentifier(HttpSessionScopeContainer.HTTP_IDENTIFIER, session);
@@ -116,8 +132,12 @@
         RequestScopeContainer scopeCtx = new RequestScopeContainer(ctx);
         scopeCtx.start();
         scopeCtx.onEvent(new RequestStart(this));
-        Map<String, AtomicComponent> contexts = MockContextFactory.createWiredContexts("source", OrderedDependentPojoImpl.class,
-                scopeCtx, "target", OrderedInitPojoImpl.class, scopeCtx);
+        Map<String, AtomicComponent> contexts = MockContextFactory.createWiredContexts("source",
+            OrderedDependentPojoImpl.class,
+            scopeCtx,
+            "target",
+            OrderedInitPojoImpl.class,
+            scopeCtx);
         AtomicComponent sourceComponent = contexts.get("source");
         AtomicComponent targetComponent = contexts.get("target");
         scopeCtx.register(sourceComponent);

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/HttpSessionScopeInstanceLifecycleTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/HttpSessionScopeInstanceLifecycleTestCase.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/HttpSessionScopeInstanceLifecycleTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/HttpSessionScopeInstanceLifecycleTestCase.java Sat Jun 17 10:28:07 2006
@@ -27,25 +27,34 @@
         HttpSessionScopeContainer scope = new HttpSessionScopeContainer(ctx);
         scope.start();
 
-        SystemAtomicComponent initDestroyContext = MockContextFactory.createSystemAtomicContext("InitDestroy", scope, RequestScopeInitDestroyComponent.class);
+        SystemAtomicComponent initDestroyContext = MockContextFactory.createSystemAtomicContext("InitDestroy",
+            scope,
+            RequestScopeInitDestroyComponent.class);
         initDestroyContext.start();
 
-        SystemAtomicComponent initOnlyContext = MockContextFactory.createSystemAtomicContext("InitOnly", scope, RequestScopeInitOnlyComponent.class);
+        SystemAtomicComponent initOnlyContext = MockContextFactory.createSystemAtomicContext("InitOnly",
+            scope,
+            RequestScopeInitOnlyComponent.class);
         initOnlyContext.start();
 
-        SystemAtomicComponent destroyOnlyContext = MockContextFactory.createSystemAtomicContext("DestroyOnly", scope, RequestScopeDestroyOnlyComponent.class);
+        SystemAtomicComponent destroyOnlyContext = MockContextFactory.createSystemAtomicContext("DestroyOnly",
+            scope,
+            RequestScopeDestroyOnlyComponent.class);
         destroyOnlyContext.start();
 
         Object session = new Object();
         ctx.setIdentifier(HttpSessionScopeContainer.HTTP_IDENTIFIER, session);
         scope.onEvent(new HttpSessionStart(this, session));
-        RequestScopeInitDestroyComponent initDestroy = (RequestScopeInitDestroyComponent) scope.getInstance(initDestroyContext);
+        RequestScopeInitDestroyComponent initDestroy =
+            (RequestScopeInitDestroyComponent) scope.getInstance(initDestroyContext);
         Assert.assertNotNull(initDestroy);
 
-        RequestScopeInitOnlyComponent initOnly = (RequestScopeInitOnlyComponent) scope.getInstance(initOnlyContext);
+        RequestScopeInitOnlyComponent initOnly =
+            (RequestScopeInitOnlyComponent) scope.getInstance(initOnlyContext);
         Assert.assertNotNull(initOnly);
 
-        RequestScopeDestroyOnlyComponent destroyOnly = (RequestScopeDestroyOnlyComponent) scope.getInstance(destroyOnlyContext);
+        RequestScopeDestroyOnlyComponent destroyOnly =
+            (RequestScopeDestroyOnlyComponent) scope.getInstance(destroyOnlyContext);
         Assert.assertNotNull(destroyOnly);
 
         Assert.assertTrue(initDestroy.isInitialized());
@@ -67,11 +76,14 @@
         HttpSessionScopeContainer scope = new HttpSessionScopeContainer(ctx);
         scope.start();
 
-        SystemAtomicComponent oneCtx = MockContextFactory.createSystemAtomicContext("one", scope, OrderedInitPojoImpl.class);
+        SystemAtomicComponent oneCtx =
+            MockContextFactory.createSystemAtomicContext("one", scope, OrderedInitPojoImpl.class);
         scope.register(oneCtx);
-        SystemAtomicComponent twoCtx = MockContextFactory.createSystemAtomicContext("two", scope, OrderedInitPojoImpl.class);
+        SystemAtomicComponent twoCtx =
+            MockContextFactory.createSystemAtomicContext("two", scope, OrderedInitPojoImpl.class);
         scope.register(twoCtx);
-        SystemAtomicComponent threeCtx = MockContextFactory.createSystemAtomicContext("three", scope, OrderedInitPojoImpl.class);
+        SystemAtomicComponent threeCtx =
+            MockContextFactory.createSystemAtomicContext("three", scope, OrderedInitPojoImpl.class);
         scope.register(threeCtx);
 
         Object session = new Object();
@@ -103,11 +115,14 @@
         HttpSessionScopeContainer scope = new HttpSessionScopeContainer(ctx);
         scope.start();
 
-        SystemAtomicComponent oneCtx = MockContextFactory.createSystemAtomicContext("one", scope, OrderedEagerInitPojo.class);
+        SystemAtomicComponent oneCtx =
+            MockContextFactory.createSystemAtomicContext("one", scope, OrderedEagerInitPojo.class);
         scope.register(oneCtx);
-        SystemAtomicComponent twoCtx = MockContextFactory.createSystemAtomicContext("two", scope, OrderedEagerInitPojo.class);
+        SystemAtomicComponent twoCtx =
+            MockContextFactory.createSystemAtomicContext("two", scope, OrderedEagerInitPojo.class);
         scope.register(twoCtx);
-        SystemAtomicComponent threeCtx = MockContextFactory.createSystemAtomicContext("three", scope, OrderedEagerInitPojo.class);
+        SystemAtomicComponent threeCtx =
+            MockContextFactory.createSystemAtomicContext("three", scope, OrderedEagerInitPojo.class);
         scope.register(threeCtx);
 
         Object session = new Object();

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/HttpSessionScopeRestartTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/HttpSessionScopeRestartTestCase.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/HttpSessionScopeRestartTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/HttpSessionScopeRestartTestCase.java Sat Jun 17 10:28:07 2006
@@ -14,6 +14,7 @@
 
 /**
  * Verifies the scope container properly disposes resources and canbe restarted
+ *
  * @version $$Rev$$ $$Date$$
  */
 public class HttpSessionScopeRestartTestCase extends TestCase {
@@ -22,12 +23,22 @@
         WorkContext ctx = new WorkContextImpl();
         HttpSessionScopeContainer scope = new HttpSessionScopeContainer(ctx);
         scope.start();
-        MethodEventInvoker<Object> initInvoker = new MethodEventInvoker<Object>(HttpSessionScopeRestartTestCase.InitDestroyOnce.class.getMethod("init"));
-        MethodEventInvoker<Object> destroyInvoker = new MethodEventInvoker<Object>(HttpSessionScopeRestartTestCase.InitDestroyOnce.class.getMethod("destroy"));
+        MethodEventInvoker<Object> initInvoker = new MethodEventInvoker<Object>(
+            HttpSessionScopeRestartTestCase.InitDestroyOnce.class.getMethod("init"));
+        MethodEventInvoker<Object> destroyInvoker = new MethodEventInvoker<Object>(
+            HttpSessionScopeRestartTestCase.InitDestroyOnce.class.getMethod("destroy"));
         List<Class<?>> interfaces = new ArrayList<Class<?>>();
         interfaces.add(HttpSessionScopeRestartTestCase.InitDestroyOnce.class);
-        SystemAtomicComponent context = MockContextFactory.createSystemAtomicContext("InitDestroy", scope, interfaces,
-                HttpSessionScopeRestartTestCase.InitDestroyOnce.class, false, initInvoker, destroyInvoker, null, null);
+        SystemAtomicComponent context = MockContextFactory.createSystemAtomicContext(
+            "InitDestroy",
+            scope,
+            interfaces,
+            HttpSessionScopeRestartTestCase.InitDestroyOnce.class,
+            false,
+            initInvoker,
+            destroyInvoker,
+            null,
+            null);
         context.start();
 
         Object session = new Object();

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/InstanceWrapperTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/InstanceWrapperTestCase.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/InstanceWrapperTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/InstanceWrapperTestCase.java Sat Jun 17 10:28:07 2006
@@ -1,7 +1,7 @@
 package org.apache.tuscany.core.component.scope;
 
-import org.apache.tuscany.spi.component.AtomicComponent;
 import org.apache.tuscany.spi.Lifecycle;
+import org.apache.tuscany.spi.component.AtomicComponent;
 import org.jmock.Mock;
 import org.jmock.MockObjectTestCase;
 import org.jmock.core.Invocation;
@@ -13,7 +13,6 @@
 public class InstanceWrapperTestCase extends MockObjectTestCase {
 
 
-
     public void testExceptionInit() throws Exception {
         AtomicComponent component = getComponent();
         InstanceWrapper wrapper = new InstanceWrapperImpl(component, new Object());
@@ -23,7 +22,7 @@
         } catch (SomeException e) {
             // expected
         }
-        assertEquals(Lifecycle.ERROR,wrapper.getLifecycleState());
+        assertEquals(Lifecycle.ERROR, wrapper.getLifecycleState());
     }
 
     public void testNonStart() throws Exception {
@@ -50,7 +49,7 @@
                 return stringBuffer.append("bad init");
             }
         });
-       return (AtomicComponent) mock.proxy();
+        return (AtomicComponent) mock.proxy();
     }
 
     private class SomeException extends RuntimeException {

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/ModuleScopeInstanceLifecycleTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/ModuleScopeInstanceLifecycleTestCase.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/ModuleScopeInstanceLifecycleTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/ModuleScopeInstanceLifecycleTestCase.java Sat Jun 17 10:28:07 2006
@@ -28,23 +28,31 @@
         ModuleScopeContainer scope = new ModuleScopeContainer(ctx);
         scope.start();
 
-        SystemAtomicComponent initDestroyContext = MockContextFactory.createSystemAtomicContext("InitDestroy", scope, ModuleScopeInitDestroyComponent.class);
+        SystemAtomicComponent initDestroyContext = MockContextFactory.createSystemAtomicContext("InitDestroy",
+            scope,
+            ModuleScopeInitDestroyComponent.class);
         initDestroyContext.start();
 
-        SystemAtomicComponent initOnlyContext = MockContextFactory.createSystemAtomicContext("InitOnly", scope, ModuleScopeInitOnlyComponent.class);
+        SystemAtomicComponent initOnlyContext = MockContextFactory.createSystemAtomicContext("InitOnly",
+            scope,
+            ModuleScopeInitOnlyComponent.class);
         initOnlyContext.start();
 
-        SystemAtomicComponent destroyOnlyContext = MockContextFactory.createSystemAtomicContext("DestroyOnly", scope, ModuleScopeDestroyOnlyComponent.class);
+        SystemAtomicComponent destroyOnlyContext = MockContextFactory.createSystemAtomicContext("DestroyOnly",
+            scope,
+            ModuleScopeDestroyOnlyComponent.class);
         destroyOnlyContext.start();
 
         scope.onEvent(new CompositeStart(this, null));
-        ModuleScopeInitDestroyComponent initDestroy = (ModuleScopeInitDestroyComponent) scope.getInstance(initDestroyContext);
+        ModuleScopeInitDestroyComponent initDestroy =
+            (ModuleScopeInitDestroyComponent) scope.getInstance(initDestroyContext);
         Assert.assertNotNull(initDestroy);
 
         ModuleScopeInitOnlyComponent initOnly = (ModuleScopeInitOnlyComponent) scope.getInstance(initOnlyContext);
         Assert.assertNotNull(initOnly);
 
-        ModuleScopeDestroyOnlyComponent destroyOnly = (ModuleScopeDestroyOnlyComponent) scope.getInstance(destroyOnlyContext);
+        ModuleScopeDestroyOnlyComponent destroyOnly =
+            (ModuleScopeDestroyOnlyComponent) scope.getInstance(destroyOnlyContext);
         Assert.assertNotNull(destroyOnly);
 
         Assert.assertTrue(initDestroy.isInitialized());
@@ -66,11 +74,17 @@
         ModuleScopeContainer scope = new ModuleScopeContainer(ctx);
         scope.start();
 
-        SystemAtomicComponent oneCtx = MockContextFactory.createSystemAtomicContext("one", scope, OrderedInitPojoImpl.class);
+        SystemAtomicComponent oneCtx = MockContextFactory.createSystemAtomicContext("one",
+            scope,
+            OrderedInitPojoImpl.class);
         scope.register(oneCtx);
-        SystemAtomicComponent twoCtx = MockContextFactory.createSystemAtomicContext("two", scope, OrderedInitPojoImpl.class);
+        SystemAtomicComponent twoCtx = MockContextFactory.createSystemAtomicContext("two",
+            scope,
+            OrderedInitPojoImpl.class);
         scope.register(twoCtx);
-        SystemAtomicComponent threeCtx = MockContextFactory.createSystemAtomicContext("three", scope, OrderedInitPojoImpl.class);
+        SystemAtomicComponent threeCtx = MockContextFactory.createSystemAtomicContext("three",
+            scope,
+            OrderedInitPojoImpl.class);
         scope.register(threeCtx);
 
         scope.onEvent(new CompositeStart(this, null));
@@ -100,11 +114,17 @@
         ModuleScopeContainer scope = new ModuleScopeContainer(ctx);
         scope.start();
 
-        SystemAtomicComponent oneCtx = MockContextFactory.createSystemAtomicContext("one", scope, OrderedEagerInitPojo.class);
+        SystemAtomicComponent oneCtx = MockContextFactory.createSystemAtomicContext("one",
+            scope,
+            OrderedEagerInitPojo.class);
         scope.register(oneCtx);
-        SystemAtomicComponent twoCtx = MockContextFactory.createSystemAtomicContext("two", scope, OrderedEagerInitPojo.class);
+        SystemAtomicComponent twoCtx = MockContextFactory.createSystemAtomicContext("two",
+            scope,
+            OrderedEagerInitPojo.class);
         scope.register(twoCtx);
-        SystemAtomicComponent threeCtx = MockContextFactory.createSystemAtomicContext("three", scope, OrderedEagerInitPojo.class);
+        SystemAtomicComponent threeCtx = MockContextFactory.createSystemAtomicContext("three",
+            scope,
+            OrderedEagerInitPojo.class);
         scope.register(threeCtx);
 
         scope.onEvent(new CompositeStart(this, null));

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/ModuleScopeRestartTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/ModuleScopeRestartTestCase.java?rev=415032&r1=415031&r2=415032&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/ModuleScopeRestartTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/component/scope/ModuleScopeRestartTestCase.java Sat Jun 17 10:28:07 2006
@@ -23,12 +23,14 @@
         WorkContext ctx = new WorkContextImpl();
         ModuleScopeContainer scope = new ModuleScopeContainer(ctx);
         scope.start();
-        MethodEventInvoker<Object> initInvoker = new MethodEventInvoker<Object>(InitDestroyOnce.class.getMethod("init"));
-        MethodEventInvoker<Object> destroyInvoker = new MethodEventInvoker<Object>(InitDestroyOnce.class.getMethod("destroy"));
+        MethodEventInvoker<Object> initInvoker =
+            new MethodEventInvoker<Object>(InitDestroyOnce.class.getMethod("init"));
+        MethodEventInvoker<Object> destroyInvoker =
+            new MethodEventInvoker<Object>(InitDestroyOnce.class.getMethod("destroy"));
         List<Class<?>> interfaces = new ArrayList<Class<?>>();
         interfaces.add(InitDestroyOnce.class);
         SystemAtomicComponent context = MockContextFactory.createSystemAtomicContext("InitDestroy", scope, interfaces,
-                InitDestroyOnce.class, false, initInvoker, destroyInvoker, null, null);
+            InitDestroyOnce.class, false, initInvoker, destroyInvoker, null, null);
         context.start();
 
         scope.onEvent(new CompositeStart(this, null));



---------------------------------------------------------------------
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