You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2007/05/11 18:12:06 UTC

svn commit: r537220 - in /incubator/tuscany/java/sca: modules/binding-jsonrpc/src/main/java/org/apache/tuscany/binding/jsonrpc/provider/ modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/ modules/binding-ws-axis2/src/main/java/org/apache...

Author: rfeng
Date: Fri May 11 09:12:03 2007
New Revision: 537220

URL: http://svn.apache.org/viewvc?view=rev&rev=537220
Log:
Remove <M> from ServiceBindingProvider and ReferenceBindingProvider as it's not referenced at all

Modified:
    incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/binding/jsonrpc/provider/JSONRPCBindingProviderFactory.java
    incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/binding/jsonrpc/provider/JSONRPCReferenceBindingProvider.java
    incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/binding/jsonrpc/provider/JSONRPCServiceBindingProvider.java
    incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/RMIBindingProvider.java
    incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/RMIBindingProviderFactory.java
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2BindingInvoker.java
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2BindingProviderFactory.java
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2ReferenceBindingProvider.java
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2ServiceBindingProvider.java
    incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/BindingProviderFactory.java
    incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ReferenceBindingProvider.java
    incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ServiceBindingProvider.java
    incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/RuntimeSCABindingProvider.java
    incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/RuntimeSCABindingProviderFactory.java
    incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/databinding/impl/DefaultMediator.java
    incubator/tuscany/java/sca/samples/binding-echo/src/main/java/echo/provider/EchoBindingProviderFactory.java
    incubator/tuscany/java/sca/samples/binding-echo/src/main/java/echo/provider/EchoReferenceBindingProvider.java
    incubator/tuscany/java/sca/samples/binding-echo/src/main/java/echo/provider/EchoServiceBindingProvider.java
    incubator/tuscany/java/sca/samples/databinding-echo/src/main/java/echo/provider/EchoBindingProviderFactory.java
    incubator/tuscany/java/sca/samples/databinding-echo/src/main/java/echo/provider/EchoReferenceBindingProvider.java
    incubator/tuscany/java/sca/samples/databinding-echo/src/main/java/echo/provider/EchoServiceBindingProvider.java

Modified: incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/binding/jsonrpc/provider/JSONRPCBindingProviderFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/binding/jsonrpc/provider/JSONRPCBindingProviderFactory.java?view=diff&rev=537220&r1=537219&r2=537220
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/binding/jsonrpc/provider/JSONRPCBindingProviderFactory.java (original)
+++ incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/binding/jsonrpc/provider/JSONRPCBindingProviderFactory.java Fri May 11 09:12:03 2007
@@ -43,11 +43,11 @@
         this.servletHost = servletHost;
     }
 
-    public ReferenceBindingProvider<JSONRPCBinding> createReferenceBindingProvider(RuntimeComponent component, RuntimeComponentReference reference, JSONRPCBinding binding) {
+    public ReferenceBindingProvider createReferenceBindingProvider(RuntimeComponent component, RuntimeComponentReference reference, JSONRPCBinding binding) {
         return new JSONRPCReferenceBindingProvider(component, reference, binding);
     }
 
-    public ServiceBindingProvider<JSONRPCBinding> createServiceBindingProvider(RuntimeComponent component, RuntimeComponentService service, JSONRPCBinding binding) {
+    public ServiceBindingProvider createServiceBindingProvider(RuntimeComponent component, RuntimeComponentService service, JSONRPCBinding binding) {
         return new JSONRPCServiceBindingProvider(component, service, binding, servletHost);
     }
     

Modified: incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/binding/jsonrpc/provider/JSONRPCReferenceBindingProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/binding/jsonrpc/provider/JSONRPCReferenceBindingProvider.java?view=diff&rev=537220&r1=537219&r2=537220
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/binding/jsonrpc/provider/JSONRPCReferenceBindingProvider.java (original)
+++ incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/binding/jsonrpc/provider/JSONRPCReferenceBindingProvider.java Fri May 11 09:12:03 2007
@@ -28,22 +28,22 @@
 
 import org.apache.tuscany.binding.jsonrpc.JSONRPCBinding;
 
-
 /**
  * Implementation of the JSONRPC binding provider.
  * 
  * @version $Rev$ $Date$
  */
-public class JSONRPCReferenceBindingProvider implements ReferenceBindingProvider<JSONRPCBinding> {
-    
+public class JSONRPCReferenceBindingProvider implements ReferenceBindingProvider {
+
     private RuntimeComponentReference reference;
-    
-    public JSONRPCReferenceBindingProvider(RuntimeComponent component, RuntimeComponentReference reference, JSONRPCBinding binding) {
+
+    public JSONRPCReferenceBindingProvider(RuntimeComponent component,
+                                           RuntimeComponentReference reference,
+                                           JSONRPCBinding binding) {
         this.reference = reference;
     }
 
-    public Invoker createInvoker(Operation operation,
-                                         boolean isCallback) {
+    public Invoker createInvoker(Operation operation, boolean isCallback) {
         if (isCallback) {
             throw new UnsupportedOperationException();
         } else {

Modified: incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/binding/jsonrpc/provider/JSONRPCServiceBindingProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/binding/jsonrpc/provider/JSONRPCServiceBindingProvider.java?view=diff&rev=537220&r1=537219&r2=537220
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/binding/jsonrpc/provider/JSONRPCServiceBindingProvider.java (original)
+++ incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/binding/jsonrpc/provider/JSONRPCServiceBindingProvider.java Fri May 11 09:12:03 2007
@@ -35,21 +35,23 @@
  * 
  * @version $Rev$ $Date$
  */
-public class JSONRPCServiceBindingProvider implements ServiceBindingProvider<JSONRPCBinding> {
-    
-    
+public class JSONRPCServiceBindingProvider implements ServiceBindingProvider {
+
     private static int servletRegistrationCount = 0;
     private RuntimeComponent component;
-    private RuntimeComponentService service;  
+    private RuntimeComponentService service;
     private JSONRPCBinding binding;
     private ServletHost servletHost;
-    
+
     // path to the JSONRPC javascript servlet
     public static final String SCRIPT_GETTER_SERVICE_MAPPING = "/SCA/scripts";
-    
+
     public static final String JSONRPC_SERVICE_MAPPING_PREFIX = "/";
-    
-    public JSONRPCServiceBindingProvider(RuntimeComponent component, RuntimeComponentService service, JSONRPCBinding binding, ServletHost servletHost) {
+
+    public JSONRPCServiceBindingProvider(RuntimeComponent component,
+                                         RuntimeComponentService service,
+                                         JSONRPCBinding binding,
+                                         ServletHost servletHost) {
         this.component = component;
         this.service = service;
         this.binding = binding;
@@ -62,16 +64,17 @@
 
     public void start() {
         JSONRPCEntryPointServlet servlet;
-        
+
         Class<?> aClass = getTargetJavaClass(service.getInterfaceContract().getInterface());
-        Object instance = component.createSelfReference(aClass).getService();                       
-        
+        Object instance = component.createSelfReference(aClass).getService();
+
         servlet = new JSONRPCEntryPointServlet(binding.getName(), aClass, instance);
 
         // register the servlet based on the service name
         servletHost.addServletMapping(JSONRPC_SERVICE_MAPPING_PREFIX + binding.getName(), servlet);
 
-        // if the script getter servlet is not already registered then register it
+        // if the script getter servlet is not already registered then register
+        // it
         if (servletRegistrationCount == 0) {
             servletHost.addServletMapping(SCRIPT_GETTER_SERVICE_MAPPING, new JSONRPCScriptServlet());
         }
@@ -81,19 +84,22 @@
     }
 
     public void stop() {
-        
+
         // Unregister from the servlet mapping
         servletHost.removeServletMapping(JSONRPC_SERVICE_MAPPING_PREFIX + binding.getName());
         servletRegistrationCount--;
-        // if we unregistered the last JSONRPC servlet, then unreister the script servlet
+        // if we unregistered the last JSONRPC servlet, then unreister the
+        // script servlet
         if (servletRegistrationCount == 0) {
             servletHost.removeServletMapping(SCRIPT_GETTER_SERVICE_MAPPING);
-        }        
+        }
     }
-    
+
     private Class<?> getTargetJavaClass(Interface targetInterface) {
-        //TODO: right now assume that the target is always a Java Implementation.  Need to figure out
-        // how to generate Java Interface in cases where the target is not a Java Implementation
+        // TODO: right now assume that the target is always a Java
+        // Implementation. Need to figure out
+        // how to generate Java Interface in cases where the target is not a
+        // Java Implementation
         return ((JavaInterface)targetInterface).getJavaClass();
     }
 

Modified: incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/RMIBindingProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/RMIBindingProvider.java?view=diff&rev=537220&r1=537219&r2=537220
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/RMIBindingProvider.java (original)
+++ incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/RMIBindingProvider.java Fri May 11 09:12:03 2007
@@ -50,29 +50,37 @@
 /**
  * RMIBindingProvider
  */
-public class RMIBindingProvider implements ReferenceBindingProvider<RMIBinding>,
-    ServiceBindingProvider<RMIBinding>, MethodInterceptor {
+public class RMIBindingProvider implements ReferenceBindingProvider, ServiceBindingProvider, MethodInterceptor {
 
     private RuntimeComponent component;
     private RuntimeComponentService service;
     private RuntimeComponentReference reference;
     private RMIBinding binding;
     private RMIHost rmiHost;
-    
-    //need this member to morph the service interface to extend from Remote if it does not
-    // the base class's member variable interfaze is to be maintained to enable the connection
-    // of the service outbound to the component's inbound wire which requires that the service
+
+    // need this member to morph the service interface to extend from Remote if
+    // it does not
+    // the base class's member variable interfaze is to be maintained to enable
+    // the connection
+    // of the service outbound to the component's inbound wire which requires
+    // that the service
     // and the component match in their service contracts.
     private Interface serviceInterface;
-    
-    public RMIBindingProvider(RuntimeComponent component, RuntimeComponentService service, RMIBinding binding, RMIHost rmiHost) {
+
+    public RMIBindingProvider(RuntimeComponent component,
+                              RuntimeComponentService service,
+                              RMIBinding binding,
+                              RMIHost rmiHost) {
         this.component = component;
         this.service = service;
         this.binding = binding;
         this.rmiHost = rmiHost;
     }
 
-    public RMIBindingProvider(RuntimeComponent component, RuntimeComponentReference reference, RMIBinding binding, RMIHost rmiHost) {
+    public RMIBindingProvider(RuntimeComponent component,
+                              RuntimeComponentReference reference,
+                              RMIBinding binding,
+                              RMIHost rmiHost) {
         this.component = component;
         this.reference = reference;
         this.binding = binding;
@@ -90,15 +98,13 @@
         if (service != null) {
             URI uri = URI.create(component.getURI() + "/" + binding.getName());
             binding.setURI(uri.toString());
-            
+
             this.serviceInterface = service.getInterfaceContract().getInterface();
-            
+
             Remote rmiProxy = createRmiService();
-            
+
             try {
-                rmiHost.registerService(binding.getRmiServiceName(),
-                                        getPort(binding.getRmiPort()),
-                                        rmiProxy);
+                rmiHost.registerService(binding.getRmiServiceName(), getPort(binding.getRmiPort()), rmiProxy);
             } catch (RMIHostException e) {
                 throw new NoRemoteServiceException(e);
             }
@@ -108,8 +114,7 @@
     public void stop() {
         if (service != null) {
             try {
-                rmiHost.unregisterService(binding.getRmiServiceName(), 
-                                          getPort(binding.getRmiPort()));
+                rmiHost.unregisterService(binding.getRmiServiceName(), getPort(binding.getRmiPort()));
             } catch (RMIHostException e) {
                 throw new NoRemoteServiceException(e.getMessage());
             }
@@ -117,15 +122,11 @@
     }
 
     public Invoker createInvoker(Operation operation, boolean isCallback) {
-       try {
-            Method remoteMethod = 
-                JavaInterfaceUtil.findMethod(((JavaInterface)reference.getInterfaceContract().getInterface()).getJavaClass(),
-                                                operation);
-            return new RMIBindingInvoker(rmiHost, 
-                                             binding.getRmiHostName(), 
-                                             binding.getRmiPort(), 
-                                             binding.getRmiServiceName(), 
-                                             remoteMethod);
+        try {
+            Method remoteMethod = JavaInterfaceUtil.findMethod(((JavaInterface)reference.getInterfaceContract()
+                .getInterface()).getJavaClass(), operation);
+            return new RMIBindingInvoker(rmiHost, binding.getRmiHostName(), binding.getRmiPort(), binding
+                .getRmiServiceName(), remoteMethod);
         } catch (NoSuchMethodException e) {
             throw new NoRemoteMethodException(operation.toString(), e);
         }
@@ -137,28 +138,31 @@
         enhancer.setCallback(this);
         Class targetJavaInterface = getTargetJavaClass(serviceInterface);
         if (!Remote.class.isAssignableFrom(targetJavaInterface)) {
-            RMIServiceClassLoader classloader =
-                new RMIServiceClassLoader(getClass().getClassLoader());
+            RMIServiceClassLoader classloader = new RMIServiceClassLoader(getClass().getClassLoader());
             final byte[] byteCode = generateRemoteInterface(targetJavaInterface);
             targetJavaInterface = classloader.defineClass(byteCode);
             enhancer.setClassLoader(classloader);
         }
-        enhancer.setInterfaces(new Class[]{targetJavaInterface});
-        return (Remote) enhancer.create();
+        enhancer.setInterfaces(new Class[] {targetJavaInterface});
+        return (Remote)enhancer.create();
     }
-    
-    // if the interface of the component whose serviceBindings must be exposed as RMI Service, does not
-    // implement java.rmi.Remote, then generate such an interface. This method will stop with
-    // just generating the bytecode. Defining the class from the byte code must tbe the responsibility
-    // of the caller of this method, since it requires a classloader to be created to define and load
+
+    // if the interface of the component whose serviceBindings must be exposed
+    // as RMI Service, does not
+    // implement java.rmi.Remote, then generate such an interface. This method
+    // will stop with
+    // just generating the bytecode. Defining the class from the byte code must
+    // tbe the responsibility
+    // of the caller of this method, since it requires a classloader to be
+    // created to define and load
     // this interface.
     protected byte[] generateRemoteInterface(Class serviceInterface) {
         String interfazeName = serviceInterface.getCanonicalName();
         ClassWriter cw = new ClassWriter(false);
 
         String simpleName = serviceInterface.getSimpleName();
-        cw.visit(Constants.V1_5, Constants.ACC_PUBLIC + Constants.ACC_ABSTRACT + Constants.ACC_INTERFACE,
-            interfazeName.replace('.', '/'), "java/lang/Object", new String[]{"java/rmi/Remote"}, simpleName + ".java");
+        cw.visit(Constants.V1_5, Constants.ACC_PUBLIC + Constants.ACC_ABSTRACT + Constants.ACC_INTERFACE, interfazeName
+            .replace('.', '/'), "java/lang/Object", new String[] {"java/rmi/Remote"}, simpleName + ".java");
 
         StringBuffer argsAndReturn = null;
         Method[] methods = serviceInterface.getMethods();
@@ -173,22 +177,26 @@
             argsAndReturn.append(")");
             argsAndReturn.append(Type.getType(returnType));
 
-            cw.visitMethod(Constants.ACC_PUBLIC + Constants.ACC_ABSTRACT, method.getName(), argsAndReturn.toString(),
-                new String[]{"java/rmi/RemoteException"}, null);
+            cw.visitMethod(Constants.ACC_PUBLIC + Constants.ACC_ABSTRACT,
+                           method.getName(),
+                           argsAndReturn.toString(),
+                           new String[] {"java/rmi/RemoteException"},
+                           null);
         }
         cw.visitEnd();
         return cw.toByteArray();
     }
-    
+
     public Object intercept(Object object, Method method, Object[] args, MethodProxy methodProxy) throws Throwable {
-        // since incoming method signatures have 'remotemethod invocation' it will not match with the
-        // wired component's method signatures. Hence need to pull in the corresponding method from the
+        // since incoming method signatures have 'remotemethod invocation' it
+        // will not match with the
+        // wired component's method signatures. Hence need to pull in the
+        // corresponding method from the
         // component's service contract interface to make this invocation.
 
-        return invokeTarget(JavaInterfaceUtil.findOperation(method, serviceInterface.getOperations()), 
-                                                            args);
+        return invokeTarget(JavaInterfaceUtil.findOperation(method, serviceInterface.getOperations()), args);
     }
-    
+
     public Object invokeTarget(Operation op, Object[] args) throws InvocationTargetException {
         Message requestMsg = new MessageImpl();
         requestMsg.setWorkContext(WorkContextTunnel.getThreadWorkContext());
@@ -201,7 +209,7 @@
         }
         return responseMsg.getBody();
     }
-    
+
     protected int getPort(String port) {
         int portNumber = RMIHost.RMI_DEFAULT_PORT;
         if (port != null && port.length() > 0) {
@@ -210,13 +218,15 @@
 
         return portNumber;
     }
-    
+
     private Class<?> getTargetJavaClass(Interface targetInterface) {
-        //TODO: right now assume that the target is always a Java Implementation.  Need to figure out
-        // how to generate Java Interface in cases where the target is not a Java Implementation
+        // TODO: right now assume that the target is always a Java
+        // Implementation. Need to figure out
+        // how to generate Java Interface in cases where the target is not a
+        // Java Implementation
         return ((JavaInterface)targetInterface).getJavaClass();
     }
-    
+
     private class RMIServiceClassLoader extends ClassLoader {
         public RMIServiceClassLoader(ClassLoader parent) {
             super(parent);

Modified: incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/RMIBindingProviderFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/RMIBindingProviderFactory.java?view=diff&rev=537220&r1=537219&r2=537220
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/RMIBindingProviderFactory.java (original)
+++ incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/RMIBindingProviderFactory.java Fri May 11 09:12:03 2007
@@ -40,11 +40,11 @@
         this.rmiHost = rmiHost;
     }
 
-    public ReferenceBindingProvider<RMIBinding> createReferenceBindingProvider(RuntimeComponent component, RuntimeComponentReference reference, RMIBinding binding) {
+    public ReferenceBindingProvider createReferenceBindingProvider(RuntimeComponent component, RuntimeComponentReference reference, RMIBinding binding) {
         return new RMIBindingProvider(component, reference, binding, rmiHost);
     }
 
-    public ServiceBindingProvider<RMIBinding> createServiceBindingProvider(RuntimeComponent component, RuntimeComponentService service, RMIBinding binding) {
+    public ServiceBindingProvider createServiceBindingProvider(RuntimeComponent component, RuntimeComponentService service, RMIBinding binding) {
         return new RMIBindingProvider(component, service, binding, rmiHost);
     }
     

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2BindingInvoker.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2BindingInvoker.java?view=diff&rev=537220&r1=537219&r2=537220
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2BindingInvoker.java (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2BindingInvoker.java Fri May 11 09:12:03 2007
@@ -93,7 +93,8 @@
             // ensure connections are tracked so that they can be closed by the reference binding
             MessageContext requestMC = operationClient.getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
             requestMC.getOptions().setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE);
-            
+            requestMC.getOptions().setTimeOutInMilliSeconds(120000L);
+                      
             operationClient.execute(true);
 
             MessageContext responseMC = operationClient.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2BindingProviderFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2BindingProviderFactory.java?view=diff&rev=537220&r1=537219&r2=537220
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2BindingProviderFactory.java (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2BindingProviderFactory.java Fri May 11 09:12:03 2007
@@ -41,11 +41,11 @@
         this.servletHost = servletHost;
     }
 
-    public ReferenceBindingProvider<WebServiceBinding> createReferenceBindingProvider(RuntimeComponent component, RuntimeComponentReference reference, WebServiceBinding binding) {
+    public ReferenceBindingProvider createReferenceBindingProvider(RuntimeComponent component, RuntimeComponentReference reference, WebServiceBinding binding) {
         return new Axis2ReferenceBindingProvider(component, reference, binding);
     }
 
-    public ServiceBindingProvider<WebServiceBinding> createServiceBindingProvider(RuntimeComponent component, RuntimeComponentService service, WebServiceBinding binding) {
+    public ServiceBindingProvider createServiceBindingProvider(RuntimeComponent component, RuntimeComponentService service, WebServiceBinding binding) {
         return new Axis2ServiceBindingProvider(component, service, binding, servletHost);
     }
     

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2ReferenceBindingProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2ReferenceBindingProvider.java?view=diff&rev=537220&r1=537219&r2=537220
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2ReferenceBindingProvider.java (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2ReferenceBindingProvider.java Fri May 11 09:12:03 2007
@@ -47,7 +47,7 @@
 import org.apache.tuscany.sca.invocation.Invoker;
 import org.apache.tuscany.sca.provider.ReferenceBindingProvider;
 
-public class Axis2ReferenceBindingProvider implements ReferenceBindingProvider<WebServiceBinding> {
+public class Axis2ReferenceBindingProvider implements ReferenceBindingProvider {
 
     private RuntimeComponent component;
     private RuntimeComponentReference reference;
@@ -59,7 +59,8 @@
                                          RuntimeComponentReference reference,
                                          WebServiceBinding wsBinding) {
 
-        // TODO: before the SPI changes, a composite reference was passed to the builder.
+        // TODO: before the SPI changes, a composite reference was passed to the
+        // builder.
         // Is the change to a component reference OK?
 
         this.component = component;
@@ -73,7 +74,7 @@
             throw new RuntimeException(e); // TODO: better exception
         }
         initServiceClient();
-        }
+    }
 
     // methods for ReferenceBindingActivator
 
@@ -84,17 +85,20 @@
             wsBinding.setBindingInterfaceContract(contract);
         }
 
-        // Set to use the Axiom data binding 
-        contract.getInterface().setDefaultDataBinding(OMElement.class.getName());        
+        // Set to use the Axiom data binding
+        contract.getInterface().setDefaultDataBinding(OMElement.class.getName());
 
-        // ??? following line was in Axis2BindingBuilder before the SPI changes and code reorg
+        // ??? following line was in Axis2BindingBuilder before the SPI changes
+        // and code reorg
         //
-        // URI targetURI = wsBinding.getURI() != null ? URI.create(wsBinding.getURI()) : URI.create("foo");
+        // URI targetURI = wsBinding.getURI() != null ?
+        // URI.create(wsBinding.getURI()) : URI.create("foo");
         //
-        // targetURI was passed to the ReferenceBindingExtension constructor and apparently was unused
+        // targetURI was passed to the ReferenceBindingExtension constructor and
+        // apparently was unused
         // Do we still need a targetURI?
 
-//        wsBinding.setURI(component.getURI() + "#" + reference.getName());
+        // wsBinding.setURI(component.getURI() + "#" + reference.getName());
 
         // create an Axis2 ServiceClient
         serviceClient = createServiceClient();
@@ -105,10 +109,11 @@
 
     public void stop() {
 
-        // close all connections that we have initiated, so that the jetty server
+        // close all connections that we have initiated, so that the jetty
+        // server
         // can be restarted without seeing ConnectExceptions
         HttpClient httpClient = (HttpClient)serviceClient.getServiceContext().getConfigurationContext()
-                .getProperty(HTTPConstants.CACHED_HTTP_CLIENT);
+            .getProperty(HTTPConstants.CACHED_HTTP_CLIENT);
         if (httpClient != null)
             ((MultiThreadedHttpConnectionManager)httpClient.getHttpConnectionManager()).shutdown();
     }
@@ -121,7 +126,10 @@
             QName serviceQName = wsBinding.getServiceName();
             String portName = wsBinding.getPortName();
             Definition wsdlDefinition = wsBinding.getWSDLDefinition().getDefinition();
-            AxisService axisService = AxisService.createClientSideAxisService(wsdlDefinition, serviceQName, portName, new Options());
+            AxisService axisService = AxisService.createClientSideAxisService(wsdlDefinition,
+                                                                              serviceQName,
+                                                                              portName,
+                                                                              new Options());
 
             return new ServiceClient(configContext, axisService);
         } catch (AxisFault e) {
@@ -144,24 +152,32 @@
             contract = reference.getInterfaceContract();
             wsBinding.setBindingInterfaceContract(contract);
         }
- 
+
         if (wsBinding.getBindingInterfaceContract().getCallbackInterface() == null) {
             invoker = createOperationInvoker(serviceClient, operation, false, operation.isNonBlocking());
         } else {
-            // FIXME: SDODataBinding needs to pass in TypeHelper and classLoader as parameters.
+            // FIXME: SDODataBinding needs to pass in TypeHelper and classLoader
+            // as parameters.
 
-            // FIXME: This makes the (BIG) assumption that there is only one callback method
-            // Relaxing this assumption, however, does not seem to be trivial, it may depend on knowledge
-            // of what actual callback method was invoked by the service at the other end
+            // FIXME: This makes the (BIG) assumption that there is only one
+            // callback method
+            // Relaxing this assumption, however, does not seem to be trivial,
+            // it may depend on knowledge
+            // of what actual callback method was invoked by the service at the
+            // other end
 
             RuntimeWire wire = reference.getRuntimeWire(wsBinding);
             Operation callbackOperation = findCallbackOperation(wire);
             Axis2CallbackInvocationHandler invocationHandler = new Axis2CallbackInvocationHandler(wire);
-            Axis2ReferenceCallbackTargetInvoker callbackInvoker =
-                new Axis2ReferenceCallbackTargetInvoker(callbackOperation, wire, invocationHandler);
-
-            Axis2AsyncBindingInvoker asyncInvoker = 
-                (Axis2AsyncBindingInvoker)createOperationInvoker(serviceClient, operation, true, false);
+            Axis2ReferenceCallbackTargetInvoker callbackInvoker = new Axis2ReferenceCallbackTargetInvoker(
+                                                                                                          callbackOperation,
+                                                                                                          wire,
+                                                                                                          invocationHandler);
+
+            Axis2AsyncBindingInvoker asyncInvoker = (Axis2AsyncBindingInvoker)createOperationInvoker(serviceClient,
+                                                                                                     operation,
+                                                                                                     true,
+                                                                                                     false);
             asyncInvoker.setCallbackTargetInvoker(callbackInvoker);
             invoker = asyncInvoker;
         }
@@ -170,12 +186,14 @@
     }
 
     private Operation findCallbackOperation(RuntimeWire wire) {
-        InterfaceContract contract = wire.getTarget().getInterfaceContract(); // TODO: which end?
+        InterfaceContract contract = wire.getTarget().getInterfaceContract(); // TODO:
+                                                                                // which
+                                                                                // end?
         List callbackOperations = contract.getCallbackInterface().getOperations();
         if (callbackOperations.size() != 1) {
             throw new RuntimeException("Can only handle one callback operation");
         }
-        Operation callbackOperation = (Operation) callbackOperations.get(0);
+        Operation callbackOperation = (Operation)callbackOperations.get(0);
         return callbackOperation;
     }
 
@@ -214,14 +232,14 @@
 
         return invoker;
     }
-    
+
     protected EndpointReference getPortLocationEPR() {
         String ep = wsBinding.getURI();
         if (ep == null && wsBinding.getPort() != null) {
             List wsdlPortExtensions = wsBinding.getPort().getExtensibilityElements();
             for (final Object extension : wsdlPortExtensions) {
                 if (extension instanceof SOAPAddress) {
-                    ep = ((SOAPAddress) extension).getLocationURI();
+                    ep = ((SOAPAddress)extension).getLocationURI();
                     break;
                 }
             }
@@ -233,7 +251,7 @@
         Binding binding = wsBinding.getBinding();
         if (binding != null) {
             for (Object o : binding.getBindingOperations()) {
-                BindingOperation bop = (BindingOperation) o;
+                BindingOperation bop = (BindingOperation)o;
                 if (bop.getName().equalsIgnoreCase(operationName)) {
                     for (Object o2 : bop.getExtensibilityElements()) {
                         if (o2 instanceof SOAPOperation) {

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2ServiceBindingProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2ServiceBindingProvider.java?view=diff&rev=537220&r1=537219&r2=537220
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2ServiceBindingProvider.java (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2ServiceBindingProvider.java Fri May 11 09:12:03 2007
@@ -60,7 +60,7 @@
 import org.apache.tuscany.sca.spi.component.WorkContext;
 import org.apache.tuscany.sca.spi.component.WorkContextTunnel;
 
-public class Axis2ServiceBindingProvider implements ServiceBindingProvider<WebServiceBinding> {
+public class Axis2ServiceBindingProvider implements ServiceBindingProvider {
 
     private RuntimeComponent component;
     private RuntimeComponentService service;
@@ -71,8 +71,10 @@
     // TODO: what to do about the base URI?
     private static final String BASE_URI = "http://localhost:8080/";
 
-    public Axis2ServiceBindingProvider(RuntimeComponent component, RuntimeComponentService service,
-                                       WebServiceBinding wsBinding, ServletHost servletHost) {
+    public Axis2ServiceBindingProvider(RuntimeComponent component,
+                                       RuntimeComponentService service,
+                                       WebServiceBinding wsBinding,
+                                       ServletHost servletHost) {
 
         this.component = component;
         this.service = service;
@@ -91,23 +93,25 @@
 
     public void start() {
 
-        // TODO: add back in from duplicate code in getBindingInterfaceContract to temporarily bypass NPE
+        // TODO: add back in from duplicate code in getBindingInterfaceContract
+        // to temporarily bypass NPE
         InterfaceContract contract = wsBinding.getBindingInterfaceContract();
         if (contract == null) {
             contract = service.getInterfaceContract();
             wsBinding.setBindingInterfaceContract(contract);
         }
 
-        // Set to use the Axiom data binding 
+        // Set to use the Axiom data binding
         contract.getInterface().setDefaultDataBinding(OMElement.class.getName());
 
         String uri = computeActualURI(BASE_URI, component, service).normalize().toString();
         if (uri.endsWith("/")) {
-            uri = uri.substring(0, uri.length() -1);
+            uri = uri.substring(0, uri.length() - 1);
         }
         wsBinding.setURI(uri.toString());
-        
-        // TODO: if <binding.ws> specifies the wsdl service then should create a service for every port
+
+        // TODO: if <binding.ws> specifies the wsdl service then should create a
+        // service for every port
 
         try {
             configContext.getAxisConfiguration().addService(createAxisService());
@@ -132,22 +136,25 @@
     }
 
     /**
-     * Compute the endpoint URI based on section 2.1.1 of the WS binding spec
-     * 1. The URIs in the endpoint(s) of the referenced WSDL, which may be relative
-     * 2. The URI specified by the wsa:Address element of the wsa:EndpointReference, which may be relative
-     * 3. The explicitly stated URI in the "uri" attribute of the binding.ws element, which may be relative,
-     * 4. The implicit URI as defined by in section 1.7 in the SCA Assembly spec 
-     * If the <binding.ws> has no wsdlElement but does have a uri attribute then the uri takes precidence
-     * over any implicitly used WSDL.
-     * @param parent 
+     * Compute the endpoint URI based on section 2.1.1 of the WS binding spec 1.
+     * The URIs in the endpoint(s) of the referenced WSDL, which may be relative
+     * 2. The URI specified by the wsa:Address element of the
+     * wsa:EndpointReference, which may be relative 3. The explicitly stated URI
+     * in the "uri" attribute of the binding.ws element, which may be relative,
+     * 4. The implicit URI as defined by in section 1.7 in the SCA Assembly spec
+     * If the <binding.ws> has no wsdlElement but does have a uri attribute then
+     * the uri takes precidence over any implicitly used WSDL.
+     * 
+     * @param parent
      */
     protected URI computeActualURI(String baseURI, RuntimeComponent component, RuntimeComponentService service) {
 
         // TODO: support wsa:Address
 
-        URI wsdlURI = null;         
+        URI wsdlURI = null;
         if (wsBinding.getServiceName() != null && wsBinding.getBindingName() == null) {
-            // <binding.ws> explicitly points at a wsdl port, may be a relative URI
+            // <binding.ws> explicitly points at a wsdl port, may be a relative
+            // URI
             wsdlURI = getEndpoint(wsBinding.getPort());
         }
         if (wsdlURI != null && wsdlURI.isAbsolute()) {
@@ -156,15 +163,16 @@
             }
             return URI.create(wsdlURI.toString());
         }
-        
+
         // either there is no wsdl port endpoint URI or that URI is relative
-        
+
         URI bindingURI = null;
         if (wsBinding.getURI() != null) {
             bindingURI = URI.create(wsBinding.getURI());
         }
         if (bindingURI != null && bindingURI.isAbsolute()) {
-            // there is an absoulte uri specified on the binding: <binding.ws uri="xxx"
+            // there is an absoulte uri specified on the binding: <binding.ws
+            // uri="xxx"
             if (wsdlURI != null) {
                 // there is a relative URI in the wsdl port
                 return URI.create(bindingURI + "/" + wsdlURI);
@@ -172,22 +180,24 @@
                 return bindingURI;
             }
         }
-        
-        // both the WSDL endpoint and binding uri are either unspecified or relative so
+
+        // both the WSDL endpoint and binding uri are either unspecified or
+        // relative so
         // the endpoint is based on the component name and service binding URI
- 
+
         URI componentURI = URI.create(component.getName());
-        
+
         String actualURI;
         if (componentURI.isAbsolute()) {
             actualURI = componentURI.toString();
         } else {
             actualURI = baseURI + "/" + componentURI;
         }
-        
+
         // with multiple services the default binding URI is the binding name
         if (bindingURI == null && component.getServices().size() > 1) {
-            // if the binding doesn't have a name use the name of the service (assumption, not in spec)
+            // if the binding doesn't have a name use the name of the service
+            // (assumption, not in spec)
             if (wsBinding.getName() != null) {
                 bindingURI = URI.create(wsBinding.getName());
             } else {
@@ -198,7 +208,7 @@
         // add any relative binding URI
         if (bindingURI != null) {
             actualURI += "/" + bindingURI;
-         }
+        }
 
         // add any relative WSDL port URI
         if (wsdlURI != null) {
@@ -216,7 +226,7 @@
             List wsdlPortExtensions = wsdlPort.getExtensibilityElements();
             for (Object extension : wsdlPortExtensions) {
                 if (extension instanceof SOAPAddress) {
-                    return URI.create(((SOAPAddress) extension).getLocationURI());
+                    return URI.create(((SOAPAddress)extension).getLocationURI());
                 }
             }
         }
@@ -226,11 +236,14 @@
     private AxisService createAxisService() throws AxisFault {
         Definition definition = wsBinding.getWSDLDefinition().getDefinition();
 
-        // WSDLToAxisServiceBuilder only uses the service and port to find the wsdl4J Binding
-        // An SCA service with binding.ws does not require a service or port so we may not have these
-        // but 
+        // WSDLToAxisServiceBuilder only uses the service and port to find the
+        // wsdl4J Binding
+        // An SCA service with binding.ws does not require a service or port so
+        // we may not have these
+        // but
 
-        WSDLToAxisServiceBuilder builder = new WSDL11ToAxisServiceBuilder(definition, wsBinding.getServiceName(), wsBinding.getPortName());
+        WSDLToAxisServiceBuilder builder = new WSDL11ToAxisServiceBuilder(definition, wsBinding.getServiceName(),
+                                                                          wsBinding.getPortName());
         builder.setServerSide(true);
         AxisService axisService = builder.populateService();
 
@@ -246,7 +259,7 @@
         axisService.addParameter(userWSDL);
 
         for (Iterator i = axisService.getOperations(); i.hasNext();) {
-            AxisOperation axisOp = (AxisOperation) i.next();
+            AxisOperation axisOp = (AxisOperation)i.next();
             Operation op = getOperation(axisOp);
             if (op != null) {
 
@@ -274,9 +287,9 @@
     protected Operation getOperation(AxisOperation axisOp) {
         String operationName = axisOp.getName().getLocalPart();
         for (Operation op : wsBinding.getBindingInterfaceContract().getInterface().getOperations()) {
-           if (op.getName().equalsIgnoreCase(operationName)) {
-               return op;
-           }
+            if (op.getName().equalsIgnoreCase(operationName)) {
+                return op;
+            }
         }
         return null;
     }
@@ -290,7 +303,7 @@
             wsBinding.setBindingInterfaceContract(contract);
         }
 
-        // Set to use the Axiom data binding 
+        // Set to use the Axiom data binding
         contract.getInterface().setDefaultDataBinding(OMElement.class.getName());
         return contract;
     }
@@ -302,11 +315,11 @@
     private Set<String> seenConversations = Collections.synchronizedSet(new HashSet<String>());
 
     public Invoker createTargetInvoker(InterfaceContract contract, Operation operation) {
-//        if (!operation.isCallback()) { TODO: no isCallback methjod yet?
-//            throw new UnsupportedOperationException();
-//        } else {
-            return new Axis2ServiceCallbackTargetInvoker(this);
-//        }
+        // if (!operation.isCallback()) { TODO: no isCallback methjod yet?
+        // throw new UnsupportedOperationException();
+        // } else {
+        return new Axis2ServiceCallbackTargetInvoker(this);
+        // }
     }
 
     public void addMapping(Object msgId, InvocationContext invCtx) {
@@ -332,15 +345,13 @@
         for (; i.hasNext();) {
             Object a = i.next();
             if (a instanceof OMElement) {
-                OMElement ao = (OMElement) a;
-                for (Iterator rpI =
-                    ao.getChildrenWithName(new QName("http://www.w3.org/2005/08/addressing", "ReferenceParameters"));
-                     rpI.hasNext();) {
-                    OMElement rpE = (OMElement) rpI.next();
-                    for (
-                        Iterator cidI = rpE.getChildrenWithName(Axis2BindingInvoker.CONVERSATION_ID_REFPARM_QN);
-                        cidI.hasNext();) {
-                        OMElement cidE = (OMElement) cidI.next();
+                OMElement ao = (OMElement)a;
+                for (Iterator rpI = ao.getChildrenWithName(new QName("http://www.w3.org/2005/08/addressing",
+                                                                     "ReferenceParameters")); rpI.hasNext();) {
+                    OMElement rpE = (OMElement)rpI.next();
+                    for (Iterator cidI = rpE.getChildrenWithName(Axis2BindingInvoker.CONVERSATION_ID_REFPARM_QN); cidI
+                        .hasNext();) {
+                        OMElement cidE = (OMElement)cidI.next();
                         conversationID = cidE.getText();
                     }
                 }

Modified: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/BindingProviderFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/BindingProviderFactory.java?view=diff&rev=537220&r1=537219&r2=537220
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/BindingProviderFactory.java (original)
+++ incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/BindingProviderFactory.java Fri May 11 09:12:03 2007
@@ -30,31 +30,29 @@
 public interface BindingProviderFactory<M extends Binding> extends ProviderFactory<M> {
 
     /**
-     * Creates a new reference binding provider for the given
-     * component and reference.
+     * Creates a new reference binding provider for the given component and
+     * reference.
      * 
      * @param component
      * @param reference
      * @param binding
      * @return
      */
-    ReferenceBindingProvider<M> createReferenceBindingProvider(
-                                                            RuntimeComponent component,
+    ReferenceBindingProvider createReferenceBindingProvider(RuntimeComponent component,
                                                             RuntimeComponentReference reference,
                                                             M binding);
 
     /**
-     * Creates a new service binding provider for the given
-     * component and service.
+     * Creates a new service binding provider for the given component and
+     * service.
      * 
      * @param component
      * @param service
      * @param binding
      * @return
      */
-    ServiceBindingProvider<M> createServiceBindingProvider(
-                                                           RuntimeComponent component,
-                                                           RuntimeComponentService service,
-                                                           M binding);
-    
+    ServiceBindingProvider createServiceBindingProvider(RuntimeComponent component,
+                                                        RuntimeComponentService service,
+                                                        M binding);
+
 }

Modified: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ReferenceBindingProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ReferenceBindingProvider.java?view=diff&rev=537220&r1=537219&r2=537220
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ReferenceBindingProvider.java (original)
+++ incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ReferenceBindingProvider.java Fri May 11 09:12:03 2007
@@ -26,24 +26,24 @@
 /**
  * @version $Rev$ $Date$
  */
-public interface ReferenceBindingProvider<M> {
+public interface ReferenceBindingProvider {
 
     /**
-     * This method will be invoked when the component reference binding
-     * is activated.
+     * This method will be invoked when the component reference binding is
+     * activated.
      */
     void start();
 
     /**
-     * This method will be invoked when the component reference binding
-     * is deactivated.
+     * This method will be invoked when the component reference binding is
+     * deactivated.
      */
     void stop();
 
     /**
-     * Create an invoker for the reference binding in the invocation chain.
-     * The invoker is responsible for making the outbound invocation over
-     * the binding protocol.
+     * Create an invoker for the reference binding in the invocation chain. The
+     * invoker is responsible for making the outbound invocation over the
+     * binding protocol.
      * 
      * @param operation The operation that the interceptor will handle
      * @param isCallback A flag to tell if the operation is for the callback
@@ -57,9 +57,9 @@
      * it will be interface contract introspected from the WSDL portType used by
      * the endpoint for a WebService binding.
      * 
-     * @return The effective interface contract, if null is returned, the interface contract
-     * for the component reference will be used
+     * @return The effective interface contract, if null is returned, the
+     *         interface contract for the component reference will be used
      */
     InterfaceContract getBindingInterfaceContract();
-    
+
 }

Modified: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ServiceBindingProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ServiceBindingProvider.java?view=diff&rev=537220&r1=537219&r2=537220
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ServiceBindingProvider.java (original)
+++ incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ServiceBindingProvider.java Fri May 11 09:12:03 2007
@@ -26,16 +26,16 @@
  * 
  * @version $Rev$ $Date$
  */
-public interface ServiceBindingProvider<M> {
+public interface ServiceBindingProvider {
     /**
-     * This method will be invoked when the component service binding
-     * is activated.
+     * This method will be invoked when the component service binding is
+     * activated.
      */
     void start();
 
     /**
-     * This method will be invoked when the component service binding
-     * is deactivated.
+     * This method will be invoked when the component service binding is
+     * deactivated.
      */
     void stop();
 
@@ -45,8 +45,8 @@
      * the endpoint for a WebService binding.
      * 
      * @param service The component service that owns the service binding
-     * @return The effective interface contract, if null is returned, the interface contract
-     * for the component service will be used
+     * @return The effective interface contract, if null is returned, the
+     *         interface contract for the component service will be used
      */
     InterfaceContract getBindingInterfaceContract();
 }

Modified: incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/RuntimeSCABindingProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/RuntimeSCABindingProvider.java?view=diff&rev=537220&r1=537219&r2=537220
==============================================================================
--- incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/RuntimeSCABindingProvider.java (original)
+++ incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/RuntimeSCABindingProvider.java Fri May 11 09:12:03 2007
@@ -30,7 +30,7 @@
 /**
  * @version $Rev$ $Date$
  */
-public class RuntimeSCABindingProvider implements ReferenceBindingProvider<SCABinding> {
+public class RuntimeSCABindingProvider implements ReferenceBindingProvider {
     
     private RuntimeComponentReference reference;
     

Modified: incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/RuntimeSCABindingProviderFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/RuntimeSCABindingProviderFactory.java?view=diff&rev=537220&r1=537219&r2=537220
==============================================================================
--- incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/RuntimeSCABindingProviderFactory.java (original)
+++ incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/RuntimeSCABindingProviderFactory.java Fri May 11 09:12:03 2007
@@ -32,16 +32,20 @@
  */
 public class RuntimeSCABindingProviderFactory implements BindingProviderFactory<SCABinding> {
 
-    public ReferenceBindingProvider<SCABinding> createReferenceBindingProvider(RuntimeComponent component, RuntimeComponentReference reference, SCABinding binding) {
+    public ReferenceBindingProvider createReferenceBindingProvider(RuntimeComponent component,
+                                                                   RuntimeComponentReference reference,
+                                                                   SCABinding binding) {
         return new RuntimeSCABindingProvider(component, reference, binding);
     }
 
-    public ServiceBindingProvider<SCABinding> createServiceBindingProvider(RuntimeComponent component, RuntimeComponentService service, SCABinding binding) {
+    public ServiceBindingProvider createServiceBindingProvider(RuntimeComponent component,
+                                                               RuntimeComponentService service,
+                                                               SCABinding binding) {
         return null;
     }
-    
+
     public Class<SCABinding> getModelType() {
         return SCABinding.class;
     }
-    
+
 }

Modified: incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/databinding/impl/DefaultMediator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/databinding/impl/DefaultMediator.java?view=diff&rev=537220&r1=537219&r2=537220
==============================================================================
--- incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/databinding/impl/DefaultMediator.java (original)
+++ incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/databinding/impl/DefaultMediator.java Fri May 11 09:12:03 2007
@@ -93,9 +93,9 @@
                                                               Transformer transformer,
                                                               Map<String, Object> metadata) {
         DataType sourceType = (index == 0) ? sourceDataType : new DataTypeImpl<Object>(transformer
-            .getSourceDataBinding(), Object.class, null);
+            .getSourceDataBinding(), Object.class, sourceDataType.getLogical());
         DataType targetType = (index == size - 1) ? targetDataType : new DataTypeImpl<Object>(transformer
-            .getTargetDataBinding(), Object.class, null);
+            .getTargetDataBinding(), Object.class, targetDataType.getLogical());
         ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
         TransformationContext context = new TransformationContextImpl(sourceType, targetType, classLoader, metadata);
         return context;

Modified: incubator/tuscany/java/sca/samples/binding-echo/src/main/java/echo/provider/EchoBindingProviderFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/binding-echo/src/main/java/echo/provider/EchoBindingProviderFactory.java?view=diff&rev=537220&r1=537219&r2=537220
==============================================================================
--- incubator/tuscany/java/sca/samples/binding-echo/src/main/java/echo/provider/EchoBindingProviderFactory.java (original)
+++ incubator/tuscany/java/sca/samples/binding-echo/src/main/java/echo/provider/EchoBindingProviderFactory.java Fri May 11 09:12:03 2007
@@ -36,11 +36,11 @@
  */
 public class EchoBindingProviderFactory implements BindingProviderFactory<EchoBinding> {
 
-    public ReferenceBindingProvider<EchoBinding> createReferenceBindingProvider(RuntimeComponent component, RuntimeComponentReference reference, EchoBinding binding) {
+    public ReferenceBindingProvider createReferenceBindingProvider(RuntimeComponent component, RuntimeComponentReference reference, EchoBinding binding) {
         return new EchoReferenceBindingProvider(component, reference, binding);
     }
 
-    public ServiceBindingProvider<EchoBinding> createServiceBindingProvider(RuntimeComponent component, RuntimeComponentService service, EchoBinding binding) {
+    public ServiceBindingProvider createServiceBindingProvider(RuntimeComponent component, RuntimeComponentService service, EchoBinding binding) {
         return new EchoServiceBindingProvider(component, service, binding);
     }
     

Modified: incubator/tuscany/java/sca/samples/binding-echo/src/main/java/echo/provider/EchoReferenceBindingProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/binding-echo/src/main/java/echo/provider/EchoReferenceBindingProvider.java?view=diff&rev=537220&r1=537219&r2=537220
==============================================================================
--- incubator/tuscany/java/sca/samples/binding-echo/src/main/java/echo/provider/EchoReferenceBindingProvider.java (original)
+++ incubator/tuscany/java/sca/samples/binding-echo/src/main/java/echo/provider/EchoReferenceBindingProvider.java Fri May 11 09:12:03 2007
@@ -28,22 +28,22 @@
 
 import echo.EchoBinding;
 
-
 /**
  * Implementation of the Echo binding provider.
  * 
  * @version $Rev$ $Date$
  */
-public class EchoReferenceBindingProvider implements ReferenceBindingProvider<EchoBinding> {
-    
+public class EchoReferenceBindingProvider implements ReferenceBindingProvider {
+
     private RuntimeComponentReference reference;
-    
-    public EchoReferenceBindingProvider(RuntimeComponent component, RuntimeComponentReference reference, EchoBinding binding) {
+
+    public EchoReferenceBindingProvider(RuntimeComponent component,
+                                        RuntimeComponentReference reference,
+                                        EchoBinding binding) {
         this.reference = reference;
     }
 
-    public Invoker createInvoker(Operation operation,
-                                         boolean isCallback) {
+    public Invoker createInvoker(Operation operation, boolean isCallback) {
         if (isCallback) {
             throw new UnsupportedOperationException();
         } else {

Modified: incubator/tuscany/java/sca/samples/binding-echo/src/main/java/echo/provider/EchoServiceBindingProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/binding-echo/src/main/java/echo/provider/EchoServiceBindingProvider.java?view=diff&rev=537220&r1=537219&r2=537220
==============================================================================
--- incubator/tuscany/java/sca/samples/binding-echo/src/main/java/echo/provider/EchoServiceBindingProvider.java (original)
+++ incubator/tuscany/java/sca/samples/binding-echo/src/main/java/echo/provider/EchoServiceBindingProvider.java Fri May 11 09:12:03 2007
@@ -35,12 +35,12 @@
  * 
  * @version $Rev$ $Date$
  */
-public class EchoServiceBindingProvider implements ServiceBindingProvider<EchoBinding> {
-    
+public class EchoServiceBindingProvider implements ServiceBindingProvider {
+
     private RuntimeComponent component;
-    private RuntimeComponentService service;  
+    private RuntimeComponentService service;
     private EchoBinding binding;
-    
+
     public EchoServiceBindingProvider(RuntimeComponent component, RuntimeComponentService service, EchoBinding binding) {
         this.component = component;
         this.service = service;
@@ -53,17 +53,17 @@
 
     public void start() {
 
-        RuntimeComponentService componentService = (RuntimeComponentService) service;
+        RuntimeComponentService componentService = (RuntimeComponentService)service;
         RuntimeWire wire = componentService.getRuntimeWire(binding);
         InvocationChain chain = wire.getInvocationChains().get(0);
-        
+
         // Register with the hosting server
         String uri = component.getURI() + "/" + binding.getName();
         EchoServer.getServer().register(uri, new EchoService(chain.getHeadInvoker()));
     }
 
     public void stop() {
-        
+
         // Unregister from the hosting server
         String uri = component.getURI() + "/" + binding.getName();
         EchoServer.getServer().unregister(uri);

Modified: incubator/tuscany/java/sca/samples/databinding-echo/src/main/java/echo/provider/EchoBindingProviderFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/databinding-echo/src/main/java/echo/provider/EchoBindingProviderFactory.java?view=diff&rev=537220&r1=537219&r2=537220
==============================================================================
--- incubator/tuscany/java/sca/samples/databinding-echo/src/main/java/echo/provider/EchoBindingProviderFactory.java (original)
+++ incubator/tuscany/java/sca/samples/databinding-echo/src/main/java/echo/provider/EchoBindingProviderFactory.java Fri May 11 09:12:03 2007
@@ -36,11 +36,11 @@
  */
 public class EchoBindingProviderFactory implements BindingProviderFactory<EchoBinding> {
 
-    public ReferenceBindingProvider<EchoBinding> createReferenceBindingProvider(RuntimeComponent component, RuntimeComponentReference reference, EchoBinding binding) {
+    public ReferenceBindingProvider createReferenceBindingProvider(RuntimeComponent component, RuntimeComponentReference reference, EchoBinding binding) {
         return new EchoReferenceBindingProvider(component, reference, binding);
     }
 
-    public ServiceBindingProvider<EchoBinding> createServiceBindingProvider(RuntimeComponent component, RuntimeComponentService service, EchoBinding binding) {
+    public ServiceBindingProvider createServiceBindingProvider(RuntimeComponent component, RuntimeComponentService service, EchoBinding binding) {
         return new EchoServiceBindingProvider(component, service, binding);
     }
     

Modified: incubator/tuscany/java/sca/samples/databinding-echo/src/main/java/echo/provider/EchoReferenceBindingProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/databinding-echo/src/main/java/echo/provider/EchoReferenceBindingProvider.java?view=diff&rev=537220&r1=537219&r2=537220
==============================================================================
--- incubator/tuscany/java/sca/samples/databinding-echo/src/main/java/echo/provider/EchoReferenceBindingProvider.java (original)
+++ incubator/tuscany/java/sca/samples/databinding-echo/src/main/java/echo/provider/EchoReferenceBindingProvider.java Fri May 11 09:12:03 2007
@@ -34,7 +34,7 @@
  * 
  * @version $Rev$ $Date$
  */
-public class EchoReferenceBindingProvider implements ReferenceBindingProvider<EchoBinding> {
+public class EchoReferenceBindingProvider implements ReferenceBindingProvider {
     
     private RuntimeComponentReference reference;
     

Modified: incubator/tuscany/java/sca/samples/databinding-echo/src/main/java/echo/provider/EchoServiceBindingProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/databinding-echo/src/main/java/echo/provider/EchoServiceBindingProvider.java?view=diff&rev=537220&r1=537219&r2=537220
==============================================================================
--- incubator/tuscany/java/sca/samples/databinding-echo/src/main/java/echo/provider/EchoServiceBindingProvider.java (original)
+++ incubator/tuscany/java/sca/samples/databinding-echo/src/main/java/echo/provider/EchoServiceBindingProvider.java Fri May 11 09:12:03 2007
@@ -35,7 +35,7 @@
  * 
  * @version $Rev$ $Date$
  */
-public class EchoServiceBindingProvider implements ServiceBindingProvider<EchoBinding> {
+public class EchoServiceBindingProvider implements ServiceBindingProvider {
     
     private RuntimeComponent component;
     private RuntimeComponentService service;  



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