tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rf...@apache.org
Subject svn commit: r826368 - in /tuscany/java/sca/modules: binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/ core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/module/ core-databinding/src/main/resources/META-INF/...
Date Sun, 18 Oct 2009 07:22:25 GMT
Author: rfeng
Date: Sun Oct 18 07:22:23 2009
New Revision: 826368

URL: http://svn.apache.org/viewvc?rev=826368&view=rev
Log:
Change some extension code to be declarative instead of being registered using module activators

Added:
    tuscany/java/sca/modules/core-databinding/src/main/resources/META-INF/services/org.apache.tuscany.sca.runtime.RuntimeWireProcessor
    tuscany/java/sca/modules/implementation-java-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory
    tuscany/java/sca/modules/implementation-java-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.runtime.RuntimeWireProcessor
    tuscany/java/sca/modules/interface-java/src/main/resources/META-INF/services/org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor
Removed:
    tuscany/java/sca/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/module/
    tuscany/java/sca/modules/core-databinding/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator
    tuscany/java/sca/modules/core-databinding/src/test/java/org/apache/tuscany/sca/core/databinding/processor/
    tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/module/
    tuscany/java/sca/modules/implementation-java-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator
Modified:
    tuscany/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java
    tuscany/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java
    tuscany/java/sca/modules/core-databinding/src/main/resources/META-INF/services/org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor
    tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DefaultWireProcessorExtensionPoint.java
    tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaCallbackRuntimeWireProcessor.java
    tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationProviderFactory.java
    tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/AbstractProcessorTest.java
    tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorProcessorTestCase.java
    tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicAndPropertyTestCase.java
    tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicConstructorTestCase.java
    tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessorTestCase.java
    tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeutisticExtensibleConstructorTestCase.java
    tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/PolicyProcessorTestCase.java
    tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ReferenceProcessorTestCase.java
    tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceCallbackTestCase.java
    tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessorTestCase.java
    tuscany/java/sca/modules/interface-java-jaxws/src/main/resources/META-INF/services/org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor
    tuscany/java/sca/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessorTestCase.java
    tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/DefaultJavaInterfaceFactory.java
    tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/PolicyJavaInterfaceVisitor.java
    tuscany/java/sca/modules/interface-java/src/test/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceUtilDuplicateRemotableTestCase.java
    tuscany/java/sca/modules/interface-java/src/test/java/org/apache/tuscany/sca/interfacedef/java/introspection/impl/PolicyProcessorTestCase.java

Modified: tuscany/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java?rev=826368&r1=826367&r2=826368&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java (original)
+++ tuscany/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java Sun Oct 18 07:22:23 2009
@@ -53,7 +53,7 @@
         WSDLFactory wsdlFactory = modelFactories.getFactory(WSDLFactory.class);
         XSDFactory xsdFactory = modelFactories.getFactory(XSDFactory.class);
         DocumentBuilderFactory documentBuilderFactory = modelFactories.getFactory(DocumentBuilderFactory.class);
-        JavaInterfaceFactory factory = new DefaultJavaInterfaceFactory();
+        JavaInterfaceFactory factory = new DefaultJavaInterfaceFactory(registry);
         JavaInterfaceContract javaIC = factory.createJavaInterfaceContract();
         JavaInterface iface = factory.createJavaInterface(HelloWorld.class);
         DefaultDataBindingExtensionPoint dataBindings = new DefaultDataBindingExtensionPoint(registry);

Modified: tuscany/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java?rev=826368&r1=826367&r2=826368&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java (original)
+++ tuscany/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java Sun Oct 18 07:22:23 2009
@@ -50,9 +50,9 @@
 
     @Test
     public void testGenerate() throws Exception {
-        JavaInterfaceFactory iFactory = new DefaultJavaInterfaceFactory();
-        JavaInterface iface = iFactory.createJavaInterface(TestJavaInterface.class);
         ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
+        JavaInterfaceFactory iFactory = new DefaultJavaInterfaceFactory(registry);
+        JavaInterface iface = iFactory.createJavaInterface(TestJavaInterface.class);
         DefaultDataBindingExtensionPoint dataBindings = new DefaultDataBindingExtensionPoint(new DefaultExtensionPointRegistry());
         JAXWSFaultExceptionMapper faultExceptionMapper = new JAXWSFaultExceptionMapper(dataBindings, null);
         new JAXWSJavaInterfaceProcessor(dataBindings, faultExceptionMapper, null).visitInterface(iface);

Modified: tuscany/java/sca/modules/core-databinding/src/main/resources/META-INF/services/org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/core-databinding/src/main/resources/META-INF/services/org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor?rev=826368&r1=826367&r2=826368&view=diff
==============================================================================
--- tuscany/java/sca/modules/core-databinding/src/main/resources/META-INF/services/org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor (original)
+++ tuscany/java/sca/modules/core-databinding/src/main/resources/META-INF/services/org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor Sun Oct 18 07:22:23 2009
@@ -15,5 +15,5 @@
 # specific language governing permissions and limitations
 # under the License.
 
-org.apache.tuscany.sca.core.databinding.processor.DataBindingJavaInterfaceProcessor
-org.apache.tuscany.sca.core.databinding.processor.WrapperJavaInterfaceProcessor
\ No newline at end of file
+org.apache.tuscany.sca.core.databinding.processor.DataBindingJavaInterfaceProcessor;ranking=300
+org.apache.tuscany.sca.core.databinding.processor.WrapperJavaInterfaceProcessor;ranking=200
\ No newline at end of file

Added: tuscany/java/sca/modules/core-databinding/src/main/resources/META-INF/services/org.apache.tuscany.sca.runtime.RuntimeWireProcessor
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/core-databinding/src/main/resources/META-INF/services/org.apache.tuscany.sca.runtime.RuntimeWireProcessor?rev=826368&view=auto
==============================================================================
--- tuscany/java/sca/modules/core-databinding/src/main/resources/META-INF/services/org.apache.tuscany.sca.runtime.RuntimeWireProcessor (added)
+++ tuscany/java/sca/modules/core-databinding/src/main/resources/META-INF/services/org.apache.tuscany.sca.runtime.RuntimeWireProcessor Sun Oct 18 07:22:23 2009
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License. 
+org.apache.tuscany.sca.core.databinding.wire.DataBindingRuntimeWireProcessor
\ No newline at end of file

Modified: tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DefaultWireProcessorExtensionPoint.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DefaultWireProcessorExtensionPoint.java?rev=826368&r1=826367&r2=826368&view=diff
==============================================================================
--- tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DefaultWireProcessorExtensionPoint.java (original)
+++ tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DefaultWireProcessorExtensionPoint.java Sun Oct 18 07:22:23 2009
@@ -18,20 +18,36 @@
  */
 package org.apache.tuscany.sca.runtime;
 
+import java.lang.reflect.Constructor;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.List;
 
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.LifeCycleListener;
+import org.apache.tuscany.sca.extensibility.ServiceDeclaration;
+import org.apache.tuscany.sca.extensibility.ServiceDiscovery;
 
 /**
  * The default implementation of a <code>WireProcessorExtensionPoint</code>
  *
  * @version $Rev$ $Date$
  */
-public class DefaultWireProcessorExtensionPoint implements RuntimeWireProcessorExtensionPoint {
+public class DefaultWireProcessorExtensionPoint implements RuntimeWireProcessorExtensionPoint, LifeCycleListener {
+    private ExtensionPointRegistry registry;
+    private boolean loaded;
 
-	/**
-	 * The list of WireProcessors available to the runtime
-	 */
+    /**
+     * @param registry
+     */
+    public DefaultWireProcessorExtensionPoint(ExtensionPointRegistry registry) {
+        super();
+        this.registry = registry;
+    }
+
+    /**
+     * The list of WireProcessors available to the runtime
+     */
     private final List<RuntimeWireProcessor> processors = new ArrayList<RuntimeWireProcessor>();
 
     /**
@@ -41,6 +57,9 @@
     */
     public void addWireProcessor(RuntimeWireProcessor processor) {
         processors.add(processor);
+        if (processor instanceof LifeCycleListener) {
+            ((LifeCycleListener)processor).start();
+        }
     }
 
     /**
@@ -49,15 +68,60 @@
      * @param processor The processor to de-register
      */
     public void removeWireProcessor(RuntimeWireProcessor processor) {
-        processors.remove(processor);
+        boolean found = processors.remove(processor);
+        if (found && (processor instanceof LifeCycleListener)) {
+            ((LifeCycleListener)processor).stop();
+        }
     }
-    
+
     /**
      * Returns a list of registered wire-processors.
      * 
      * @return The list of wire processors
-     */    
+     */
     public List<RuntimeWireProcessor> getWireProcessors() {
+        loadWireProcessors();
         return processors;
     }
+
+    private synchronized void loadWireProcessors() {
+        if (loaded) {
+            return;
+        }
+        try {
+            Collection<ServiceDeclaration> sds =
+                ServiceDiscovery.getInstance().getServiceDeclarations(RuntimeWireProcessor.class, true);
+            for (ServiceDeclaration sd : sds) {
+                Class type = sd.loadClass();
+                Constructor constructor = null;
+                RuntimeWireProcessor processor = null;
+                try {
+                    constructor = type.getConstructor(ExtensionPointRegistry.class);
+                    processor = (RuntimeWireProcessor)constructor.newInstance(registry);
+
+                } catch (NoSuchMethodException e) {
+                    constructor = type.getConstructor();
+                    processor = (RuntimeWireProcessor)constructor.newInstance();
+                }
+                if (processor != null) {
+                    addWireProcessor(processor);
+                }
+            }
+            loaded = true;
+        } catch (Throwable e) {
+            throw new IllegalStateException(e);
+        }
+    }
+
+    public void start() {
+    }
+
+    public void stop() {
+        for (RuntimeWireProcessor processor : processors) {
+            if ((processor instanceof LifeCycleListener)) {
+                ((LifeCycleListener)processor).stop();
+            }
+        }
+        processors.clear();
+    }
 }

Modified: tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaCallbackRuntimeWireProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaCallbackRuntimeWireProcessor.java?rev=826368&r1=826367&r2=826368&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaCallbackRuntimeWireProcessor.java (original)
+++ tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaCallbackRuntimeWireProcessor.java Sun Oct 18 07:22:23 2009
@@ -25,6 +25,9 @@
 import org.apache.tuscany.sca.assembly.Contract;
 import org.apache.tuscany.sca.assembly.Endpoint;
 import org.apache.tuscany.sca.assembly.Implementation;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.core.UtilityExtensionPoint;
 import org.apache.tuscany.sca.core.invocation.CallbackInterfaceInterceptor;
 import org.apache.tuscany.sca.implementation.java.JavaImplementation;
 import org.apache.tuscany.sca.interfacedef.Interface;
@@ -47,11 +50,19 @@
     private InterfaceContractMapper interfaceContractMapper;
     private JavaInterfaceFactory javaInterfaceFactory;
 
+    public JavaCallbackRuntimeWireProcessor(ExtensionPointRegistry registry) {
+        FactoryExtensionPoint factories = registry.getExtensionPoint(FactoryExtensionPoint.class);
+        this.javaInterfaceFactory = factories.getFactory(JavaInterfaceFactory.class);
+
+        UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
+        this.interfaceContractMapper = utilities.getUtility(InterfaceContractMapper.class);
+    }
+    
     /**
      * @param interfaceContractMapper
      * @param javaInterfaceFactory
      */
-    public JavaCallbackRuntimeWireProcessor(InterfaceContractMapper interfaceContractMapper,
+    protected JavaCallbackRuntimeWireProcessor(InterfaceContractMapper interfaceContractMapper,
                                             JavaInterfaceFactory javaInterfaceFactory) {
         super();
         this.interfaceContractMapper = interfaceContractMapper;

Modified: tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationProviderFactory.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationProviderFactory.java?rev=826368&r1=826367&r2=826368&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationProviderFactory.java (original)
+++ tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationProviderFactory.java Sun Oct 18 07:22:23 2009
@@ -19,12 +19,24 @@
 
 package org.apache.tuscany.sca.implementation.java.invocation;
 
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
 import org.apache.tuscany.sca.context.ComponentContextFactory;
+import org.apache.tuscany.sca.context.ContextFactoryExtensionPoint;
 import org.apache.tuscany.sca.context.PropertyValueFactory;
 import org.apache.tuscany.sca.context.RequestContextFactory;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.core.UtilityExtensionPoint;
+import org.apache.tuscany.sca.core.invocation.CglibProxyFactory;
+import org.apache.tuscany.sca.core.invocation.ExtensibleProxyFactory;
 import org.apache.tuscany.sca.core.invocation.ProxyFactory;
+import org.apache.tuscany.sca.core.invocation.ProxyFactoryExtensionPoint;
 import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint;
 import org.apache.tuscany.sca.implementation.java.JavaImplementation;
+import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
+import org.apache.tuscany.sca.invocation.MessageFactory;
 import org.apache.tuscany.sca.provider.ImplementationProvider;
 import org.apache.tuscany.sca.provider.ImplementationProviderFactory;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
@@ -33,32 +45,59 @@
  * @version $Rev$ $Date$
  */
 public class JavaImplementationProviderFactory implements ImplementationProviderFactory<JavaImplementation> {
-    private PropertyValueFactory propertyValueObjectFactory;
-    private DataBindingExtensionPoint dataBindingRegistry;
-    private ProxyFactory proxyService;
+    private static final Logger logger = Logger.getLogger(JavaImplementationProviderFactory.class.getName()); 
+    private PropertyValueFactory propertyValueFactory;
+    private DataBindingExtensionPoint databindings;
+    private ProxyFactory proxyFactory;
     private ComponentContextFactory componentContextFactory;
     private RequestContextFactory requestContextFactory;
 
+    public JavaImplementationProviderFactory(ExtensionPointRegistry registry) {
+        FactoryExtensionPoint factories = registry.getExtensionPoint(FactoryExtensionPoint.class);
+        MessageFactory messageFactory = factories.getFactory(MessageFactory.class);
+
+        UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
+        InterfaceContractMapper interfaceContractMapper = utilities.getUtility(InterfaceContractMapper.class);
+
+        ProxyFactoryExtensionPoint proxyFactories = registry.getExtensionPoint(ProxyFactoryExtensionPoint.class);
+        try {
+            proxyFactories.setClassProxyFactory(new CglibProxyFactory(messageFactory, interfaceContractMapper));
+        } catch (NoClassDefFoundError e) {
+            logger.log(Level.WARNING, "Class-based proxy is not supported", e);
+        }
+
+        databindings = registry.getExtensionPoint(DataBindingExtensionPoint.class);
+        propertyValueFactory = factories.getFactory(PropertyValueFactory.class);
+
+        ContextFactoryExtensionPoint contextFactories = registry.getExtensionPoint(ContextFactoryExtensionPoint.class);
+        componentContextFactory = contextFactories.getFactory(ComponentContextFactory.class);
+        requestContextFactory = contextFactories.getFactory(RequestContextFactory.class);
+
+        proxyFactory = new ExtensibleProxyFactory(proxyFactories);
+    }
+    
+    /*
     public JavaImplementationProviderFactory(ProxyFactory proxyService,
                                              DataBindingExtensionPoint dataBindingRegistry,
                                              PropertyValueFactory propertyValueObjectFactory,
                                              ComponentContextFactory componentContextFactory,
                                              RequestContextFactory requestContextFactory) {
         super();
-        this.proxyService = proxyService;
-        this.dataBindingRegistry = dataBindingRegistry;
-        this.propertyValueObjectFactory = propertyValueObjectFactory;
+        this.proxyFactory = proxyService;
+        this.databindings = dataBindingRegistry;
+        this.propertyValueFactory = propertyValueObjectFactory;
         this.componentContextFactory = componentContextFactory;
         this.requestContextFactory = requestContextFactory;
     }
+    */
 
     public ImplementationProvider createImplementationProvider(RuntimeComponent component,
                                                                JavaImplementation implementation) {
         return new JavaImplementationProvider(component,
                                               implementation,
-                                              proxyService,
-                                              dataBindingRegistry,
-                                              propertyValueObjectFactory,
+                                              proxyFactory,
+                                              databindings,
+                                              propertyValueFactory,
                                               componentContextFactory,
                                               requestContextFactory);
     }

Added: tuscany/java/sca/modules/implementation-java-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-java-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory?rev=826368&view=auto
==============================================================================
--- tuscany/java/sca/modules/implementation-java-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory (added)
+++ tuscany/java/sca/modules/implementation-java-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory Sun Oct 18 07:22:23 2009
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License. 
+
+# Implementation class for the implementation extension
+org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationProviderFactory;model=org.apache.tuscany.sca.implementation.java.JavaImplementation

Added: tuscany/java/sca/modules/implementation-java-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.runtime.RuntimeWireProcessor
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-java-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.runtime.RuntimeWireProcessor?rev=826368&view=auto
==============================================================================
--- tuscany/java/sca/modules/implementation-java-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.runtime.RuntimeWireProcessor (added)
+++ tuscany/java/sca/modules/implementation-java-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.runtime.RuntimeWireProcessor Sun Oct 18 07:22:23 2009
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License. 
+org.apache.tuscany.sca.implementation.java.invocation.JavaCallbackRuntimeWireProcessor
\ No newline at end of file

Modified: tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/AbstractProcessorTest.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/AbstractProcessorTest.java?rev=826368&r1=826367&r2=826368&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/AbstractProcessorTest.java (original)
+++ tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/AbstractProcessorTest.java Sun Oct 18 07:22:23 2009
@@ -19,10 +19,11 @@
 package org.apache.tuscany.sca.implementation.java.introspect.impl;
 
 import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
 
 import org.apache.tuscany.sca.assembly.AssemblyFactory;
 import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory;
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.implementation.java.IntrospectionException;
 import org.apache.tuscany.sca.implementation.java.JavaConstructorImpl;
 import org.apache.tuscany.sca.implementation.java.JavaImplementation;
@@ -46,8 +47,9 @@
 
 
     protected AbstractProcessorTest() {
-        factory = new DefaultAssemblyFactory();
-        javaFactory = new DefaultJavaInterfaceFactory();
+        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
+        factory = new DefaultAssemblyFactory(registry);
+        javaFactory = new DefaultJavaInterfaceFactory(registry);
         referenceProcessor = new ReferenceProcessor(factory, javaFactory);
         propertyProcessor = new PropertyProcessor(factory);
         resourceProcessor = new ResourceProcessor(factory);

Modified: tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorProcessorTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorProcessorTestCase.java?rev=826368&r1=826367&r2=826368&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorProcessorTestCase.java (original)
+++ tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ConstructorProcessorTestCase.java Sun Oct 18 07:22:23 2009
@@ -34,6 +34,8 @@
 import org.apache.tuscany.sca.assembly.AssemblyFactory;
 import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory;
 import org.apache.tuscany.sca.assembly.Multiplicity;
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.implementation.java.DefaultJavaImplementationFactory;
 import org.apache.tuscany.sca.implementation.java.JavaImplementation;
 import org.apache.tuscany.sca.implementation.java.JavaImplementationFactory;
@@ -97,8 +99,9 @@
         Constructor<Mixed> ctor1 = Mixed.class.getConstructor(String.class, String.class, String.class);
         processor.visitConstructor(ctor1, type);
 
-        AssemblyFactory assemblyFactory = new DefaultAssemblyFactory();
-        JavaInterfaceFactory javaFactory = new DefaultJavaInterfaceFactory();
+        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
+        AssemblyFactory assemblyFactory = new DefaultAssemblyFactory(registry);
+        JavaInterfaceFactory javaFactory = new DefaultJavaInterfaceFactory(registry);
         ReferenceProcessor referenceProcessor = new ReferenceProcessor(assemblyFactory, javaFactory);
         PropertyProcessor propertyProcessor = new PropertyProcessor(assemblyFactory);
         JavaParameterImpl[] parameters = type.getConstructor().getParameters();
@@ -172,8 +175,9 @@
                                                                     Set.class,
                                                                     String[].class);
         processor.visitConstructor(ctor1, type);
+        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
         AssemblyFactory assemblyFactory = new DefaultAssemblyFactory();
-        JavaInterfaceFactory javaFactory = new DefaultJavaInterfaceFactory();
+        JavaInterfaceFactory javaFactory = new DefaultJavaInterfaceFactory(registry);
         ReferenceProcessor referenceProcessor = new ReferenceProcessor(assemblyFactory, javaFactory);
         PropertyProcessor propertyProcessor = new PropertyProcessor(assemblyFactory);
         JavaParameterImpl[] parameters = type.getConstructor().getParameters();

Modified: tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicAndPropertyTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicAndPropertyTestCase.java?rev=826368&r1=826367&r2=826368&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicAndPropertyTestCase.java (original)
+++ tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicAndPropertyTestCase.java Sun Oct 18 07:22:23 2009
@@ -24,6 +24,8 @@
 
 import org.apache.tuscany.sca.assembly.AssemblyFactory;
 import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory;
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.implementation.java.DefaultJavaImplementationFactory;
 import org.apache.tuscany.sca.implementation.java.JavaConstructorImpl;
 import org.apache.tuscany.sca.implementation.java.JavaImplementation;
@@ -60,8 +62,9 @@
 
     @Before
     public void setUp() throws Exception {
+        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
         propertyProcessor = new PropertyProcessor(assemblyFactory);
-        heuristicProcessor = new HeuristicPojoProcessor(assemblyFactory, new DefaultJavaInterfaceFactory());
+        heuristicProcessor = new HeuristicPojoProcessor(assemblyFactory, new DefaultJavaInterfaceFactory(registry));
     }
 
     public static class Foo {

Modified: tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicConstructorTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicConstructorTestCase.java?rev=826368&r1=826367&r2=826368&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicConstructorTestCase.java (original)
+++ tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicConstructorTestCase.java Sun Oct 18 07:22:23 2009
@@ -28,6 +28,8 @@
 
 import org.apache.tuscany.sca.assembly.AssemblyFactory;
 import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory;
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.implementation.java.DefaultJavaImplementationFactory;
 import org.apache.tuscany.sca.implementation.java.IntrospectionException;
 import org.apache.tuscany.sca.implementation.java.JavaElementImpl;
@@ -51,8 +53,9 @@
     private JavaImplementationFactory javaImplementationFactory;
 
     public HeuristicConstructorTestCase() {
-        factory = new DefaultAssemblyFactory();
-        javaFactory = new DefaultJavaInterfaceFactory();
+        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
+        factory = new DefaultAssemblyFactory(registry);
+        javaFactory = new DefaultJavaInterfaceFactory(registry);        
         javaImplementationFactory = new DefaultJavaImplementationFactory();
         processor = new HeuristicPojoProcessor(factory, javaFactory);
     }

Modified: tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessorTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessorTestCase.java?rev=826368&r1=826367&r2=826368&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessorTestCase.java (original)
+++ tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessorTestCase.java Sun Oct 18 07:22:23 2009
@@ -30,6 +30,8 @@
 import javax.xml.namespace.QName;
 
 import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory;
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.implementation.java.DefaultJavaImplementationFactory;
 import org.apache.tuscany.sca.implementation.java.IntrospectionException;
 import org.apache.tuscany.sca.implementation.java.JavaConstructorImpl;
@@ -56,7 +58,8 @@
     private JavaImplementationFactory javaImplementationFactory;
 
     public HeuristicPojoProcessorTestCase() {
-        processor = new HeuristicPojoProcessor(new DefaultAssemblyFactory(), new DefaultJavaInterfaceFactory());
+        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
+        processor = new HeuristicPojoProcessor(new DefaultAssemblyFactory(), new DefaultJavaInterfaceFactory(registry));
         javaImplementationFactory = new DefaultJavaImplementationFactory();
     }
 

Modified: tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeutisticExtensibleConstructorTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeutisticExtensibleConstructorTestCase.java?rev=826368&r1=826367&r2=826368&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeutisticExtensibleConstructorTestCase.java (original)
+++ tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeutisticExtensibleConstructorTestCase.java Sun Oct 18 07:22:23 2009
@@ -24,6 +24,8 @@
 
 import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory;
 import org.apache.tuscany.sca.assembly.Property;
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.implementation.java.DefaultJavaImplementationFactory;
 import org.apache.tuscany.sca.implementation.java.IntrospectionException;
 import org.apache.tuscany.sca.implementation.java.JavaConstructorImpl;
@@ -46,7 +48,8 @@
     private JavaImplementationFactory javaImplementationFactory;
 
     public HeutisticExtensibleConstructorTestCase() {
-        processor = new HeuristicPojoProcessor(new DefaultAssemblyFactory(), new DefaultJavaInterfaceFactory());
+        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
+        processor = new HeuristicPojoProcessor(new DefaultAssemblyFactory(), new DefaultJavaInterfaceFactory(registry));
         javaImplementationFactory = new DefaultJavaImplementationFactory();
     }
 

Modified: tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/PolicyProcessorTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/PolicyProcessorTestCase.java?rev=826368&r1=826367&r2=826368&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/PolicyProcessorTestCase.java (original)
+++ tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/PolicyProcessorTestCase.java Sun Oct 18 07:22:23 2009
@@ -27,6 +27,8 @@
 import java.util.Map;
 
 import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory;
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.implementation.java.DefaultJavaImplementationFactory;
 import org.apache.tuscany.sca.implementation.java.JavaImplementation;
 import org.apache.tuscany.sca.implementation.java.JavaImplementationFactory;
@@ -242,9 +244,10 @@
 
     @Before
     public void setUp() throws Exception {
-        serviceProcessor = new ServiceProcessor(new DefaultAssemblyFactory(), new DefaultJavaInterfaceFactory());
+        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
+        serviceProcessor = new ServiceProcessor(new DefaultAssemblyFactory(), new DefaultJavaInterfaceFactory(registry));
         policyProcessor = new PolicyProcessor(new DefaultAssemblyFactory(), new DefaultPolicyFactory());
-        visitor = new PolicyJavaInterfaceVisitor(new DefaultPolicyFactory());
+        visitor = new PolicyJavaInterfaceVisitor(registry);
         JavaImplementationFactory javaImplementationFactory = new DefaultJavaImplementationFactory();
         type = javaImplementationFactory.createJavaImplementation();
     }

Modified: tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ReferenceProcessorTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ReferenceProcessorTestCase.java?rev=826368&r1=826367&r2=826368&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ReferenceProcessorTestCase.java (original)
+++ tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ReferenceProcessorTestCase.java Sun Oct 18 07:22:23 2009
@@ -30,6 +30,8 @@
 
 import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory;
 import org.apache.tuscany.sca.assembly.Multiplicity;
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.implementation.java.DefaultJavaImplementationFactory;
 import org.apache.tuscany.sca.implementation.java.JavaImplementation;
 import org.apache.tuscany.sca.implementation.java.JavaImplementationFactory;
@@ -50,9 +52,10 @@
 
     @Before
     public void setUp() throws Exception {
+        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
         JavaImplementationFactory javaImplementationFactory = new DefaultJavaImplementationFactory();
         type = javaImplementationFactory.createJavaImplementation();
-        processor = new ReferenceProcessor(new DefaultAssemblyFactory(), new DefaultJavaInterfaceFactory());
+        processor = new ReferenceProcessor(new DefaultAssemblyFactory(), new DefaultJavaInterfaceFactory(registry));
     }
 
     @Test

Modified: tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceCallbackTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceCallbackTestCase.java?rev=826368&r1=826367&r2=826368&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceCallbackTestCase.java (original)
+++ tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceCallbackTestCase.java Sun Oct 18 07:22:23 2009
@@ -28,6 +28,8 @@
 import java.lang.reflect.Method;
 
 import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory;
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.implementation.java.DefaultJavaImplementationFactory;
 import org.apache.tuscany.sca.implementation.java.IntrospectionException;
 import org.apache.tuscany.sca.implementation.java.JavaImplementation;
@@ -49,7 +51,8 @@
 
     @Before
     public void setUp() throws Exception {
-        processor = new ServiceProcessor(new DefaultAssemblyFactory(), new DefaultJavaInterfaceFactory());
+        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
+        processor = new ServiceProcessor(new DefaultAssemblyFactory(), new DefaultJavaInterfaceFactory(registry));
         javaImplementationFactory = new DefaultJavaImplementationFactory();
     }
 

Modified: tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessorTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessorTestCase.java?rev=826368&r1=826367&r2=826368&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessorTestCase.java (original)
+++ tuscany/java/sca/modules/implementation-java/src/test/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessorTestCase.java Sun Oct 18 07:22:23 2009
@@ -26,6 +26,8 @@
 import javax.jws.WebService;
 
 import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory;
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.implementation.java.DefaultJavaImplementationFactory;
 import org.apache.tuscany.sca.implementation.java.IntrospectionException;
 import org.apache.tuscany.sca.implementation.java.JavaImplementation;
@@ -141,7 +143,8 @@
 
     @Before
     public void setUp() throws Exception {
-        processor = new ServiceProcessor(new DefaultAssemblyFactory(), new DefaultJavaInterfaceFactory());
+        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
+        processor = new ServiceProcessor(new DefaultAssemblyFactory(), new DefaultJavaInterfaceFactory(registry));
         JavaImplementationFactory javaImplementationFactory = new DefaultJavaImplementationFactory();
         type = javaImplementationFactory.createJavaImplementation();
     }

Modified: tuscany/java/sca/modules/interface-java-jaxws/src/main/resources/META-INF/services/org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-java-jaxws/src/main/resources/META-INF/services/org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor?rev=826368&r1=826367&r2=826368&view=diff
==============================================================================
--- tuscany/java/sca/modules/interface-java-jaxws/src/main/resources/META-INF/services/org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor (original)
+++ tuscany/java/sca/modules/interface-java-jaxws/src/main/resources/META-INF/services/org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor Sun Oct 18 07:22:23 2009
@@ -14,5 +14,5 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License. 
-org.apache.tuscany.sca.interfacedef.java.jaxws.WebServiceInterfaceProcessor
-org.apache.tuscany.sca.interfacedef.java.jaxws.JAXWSJavaInterfaceProcessor
\ No newline at end of file
+org.apache.tuscany.sca.interfacedef.java.jaxws.WebServiceInterfaceProcessor;ranking=400
+org.apache.tuscany.sca.interfacedef.java.jaxws.JAXWSJavaInterfaceProcessor;ranking=100
\ No newline at end of file

Modified: tuscany/java/sca/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessorTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessorTestCase.java?rev=826368&r1=826367&r2=826368&view=diff
==============================================================================
--- tuscany/java/sca/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessorTestCase.java (original)
+++ tuscany/java/sca/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessorTestCase.java Sun Oct 18 07:22:23 2009
@@ -28,10 +28,7 @@
 import javax.xml.namespace.QName;
 
 import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
-import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint;
-import org.apache.tuscany.sca.databinding.DefaultDataBindingExtensionPoint;
-import org.apache.tuscany.sca.databinding.jaxb.DefaultXMLAdapterExtensionPoint;
-import org.apache.tuscany.sca.databinding.jaxb.XMLAdapterExtensionPoint;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.interfacedef.Operation;
 import org.apache.tuscany.sca.interfacedef.java.DefaultJavaInterfaceFactory;
 import org.apache.tuscany.sca.interfacedef.java.JavaInterface;
@@ -46,21 +43,23 @@
  * @version $Rev$ $Date$
  */
 public class JAXWSJavaInterfaceProcessorTestCase {
-    private JAXWSJavaInterfaceProcessor interfaceProcessor;
+    private ExtensionPointRegistry registry;
+    // private JAXWSJavaInterfaceProcessor interfaceProcessor;
 
     @Before
     public void setUp() throws Exception {
-        DataBindingExtensionPoint db = new DefaultDataBindingExtensionPoint(new DefaultExtensionPointRegistry());
-        XMLAdapterExtensionPoint xa = new DefaultXMLAdapterExtensionPoint();
-        interfaceProcessor = new JAXWSJavaInterfaceProcessor(db, new JAXWSFaultExceptionMapper(db, xa), xa);
+        registry = new DefaultExtensionPointRegistry();
+//        DataBindingExtensionPoint db = new DefaultDataBindingExtensionPoint(registry);
+//        XMLAdapterExtensionPoint xa = new DefaultXMLAdapterExtensionPoint();
+        // interfaceProcessor = new JAXWSJavaInterfaceProcessor(db, new JAXWSFaultExceptionMapper(db, xa), xa);
     }
 
     @Test
     public void testWrapper() throws Exception {
-        DefaultJavaInterfaceFactory iFactory = new DefaultJavaInterfaceFactory();
+        DefaultJavaInterfaceFactory iFactory = new DefaultJavaInterfaceFactory(registry);
         JavaInterface contract = iFactory.createJavaInterface(StockExceptionTest.class);
 
-        interfaceProcessor.visitInterface(contract);
+        // interfaceProcessor.visitInterface(contract);
         Operation op = contract.getOperations().get(0);
         Assert.assertTrue(!op.isWrapperStyle());
         Assert.assertEquals(new QName("http://www.example.com/stock", "stockQuoteOffer"), op.getWrapper().getInputWrapperElement().getQName());
@@ -73,14 +72,14 @@
      */
     @Test
     public final void testProcessor() throws Exception {
-        DefaultJavaInterfaceFactory iFactory = new DefaultJavaInterfaceFactory();
+        DefaultJavaInterfaceFactory iFactory = new DefaultJavaInterfaceFactory(registry);
         JavaInterface contract = iFactory.createJavaInterface(WebServiceInterfaceWithoutAnnotation.class);
 
-        interfaceProcessor.visitInterface(contract);
+        // interfaceProcessor.visitInterface(contract);
         assertFalse(contract.isRemotable());
 
         contract = iFactory.createJavaInterface(WebServiceInterfaceWithAnnotation.class);
-        interfaceProcessor.visitInterface(contract);
+        // interfaceProcessor.visitInterface(contract);
         assertTrue(contract.isRemotable());
 
         Operation op1 = contract.getOperations().get(0);

Modified: tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/DefaultJavaInterfaceFactory.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/DefaultJavaInterfaceFactory.java?rev=826368&r1=826367&r2=826368&view=diff
==============================================================================
--- tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/DefaultJavaInterfaceFactory.java (original)
+++ tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/DefaultJavaInterfaceFactory.java Sun Oct 18 07:22:23 2009
@@ -24,20 +24,11 @@
 import java.util.List;
 import java.util.logging.Logger;
 
-import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.FactoryExtensionPoint;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
 import org.apache.tuscany.sca.extensibility.ServiceDeclaration;
 import org.apache.tuscany.sca.extensibility.ServiceDiscovery;
 import org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceFactoryImpl;
-import org.apache.tuscany.sca.interfacedef.java.impl.PolicyJavaInterfaceVisitor;
 import org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor;
-import org.apache.tuscany.sca.monitor.Monitor;
-import org.apache.tuscany.sca.monitor.MonitorFactory;
-import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.Problem.Severity;
-import org.apache.tuscany.sca.policy.PolicyFactory;
 
 /**
  * A factory for the Java interface model.
@@ -48,37 +39,13 @@
     private static final Logger logger = Logger.getLogger(DefaultJavaInterfaceFactory.class.getName());
     
     private ExtensionPointRegistry extensionPointRegistry;
-    private FactoryExtensionPoint modelFactoryExtensionPoint;
-    private Monitor monitor = null;
+    // private Monitor monitor = null;
     private boolean loadedVisitors; 
     
-    public DefaultJavaInterfaceFactory() {
+    public DefaultJavaInterfaceFactory(ExtensionPointRegistry registry) {
         super();
-        this.extensionPointRegistry = new DefaultExtensionPointRegistry();
-        
-        UtilityExtensionPoint utilities = this.extensionPointRegistry.getExtensionPoint(UtilityExtensionPoint.class);
-        MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
-        if (monitorFactory != null) {
-            this.monitor = monitorFactory.createMonitor();
-        }
-
-    }
-    
-    /*
-    public DefaultJavaInterfaceFactory(FactoryExtensionPoint modelFactoryExtensionPoint) {
-        this.extensionPointRegistry = new DefaultExtensionPointRegistry();
-        
-        this.extensionPointRegistry = new DefaultExtensionPointRegistry();
-        this.modelFactoryExtensionPoint = modelFactoryExtensionPoint;
-        
-        UtilityExtensionPoint utilities = this.extensionPointRegistry.getExtensionPoint(UtilityExtensionPoint.class);
-        MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
-        if (monitorFactory != null) {
-            this.monitor = monitorFactory.createMonitor();
-        }
-
+        this.extensionPointRegistry = registry;
     }
-    */
     
     @Override
     public List<JavaInterfaceVisitor> getInterfaceVisitors() {
@@ -94,17 +61,10 @@
         if (loadedVisitors)
             return;
         
-        if (modelFactoryExtensionPoint != null) {
-            PolicyFactory policyFactory = modelFactoryExtensionPoint.getFactory(PolicyFactory.class);
-            if (policyFactory != null) {
-                addInterfaceVisitor(new PolicyJavaInterfaceVisitor(policyFactory));
-            }
-        }
-        
         // Get the databinding service declarations
         Collection<ServiceDeclaration> visitorDeclarations; 
         try {
-            visitorDeclarations = ServiceDiscovery.getInstance().getServiceDeclarations(JavaInterfaceVisitor.class.getName());
+            visitorDeclarations = ServiceDiscovery.getInstance().getServiceDeclarations(JavaInterfaceVisitor.class, true);
         } catch (IOException e) {
             throw new IllegalStateException(e);
         }
@@ -125,7 +85,6 @@
                 
             } catch (Exception e) {
                 IllegalStateException ie = new IllegalStateException(e);
-                error("IllegalStateException", visitor, ie);
                 throw ie;
             }
             
@@ -137,24 +96,5 @@
         loadedVisitors = true;
     }
 
-    
-    /**
-     * Report a exception.
-     *
-     * @param problems
-     * @param message
-     * @param model
-    */
-    private void error(String message, Object model, Exception ex) {
-        if (monitor != null) {
-            Problem problem =
-                monitor.createProblem(this.getClass().getName(),
-                                      "interface-javaxml-validation-messages.properties",
-                                      Severity.ERROR,
-                                      model,
-                                      message,
-                                      ex);
-            monitor.problem(problem);
-        }
-    }
+
 }

Modified: tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/PolicyJavaInterfaceVisitor.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/PolicyJavaInterfaceVisitor.java?rev=826368&r1=826367&r2=826368&view=diff
==============================================================================
--- tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/PolicyJavaInterfaceVisitor.java (original)
+++ tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/PolicyJavaInterfaceVisitor.java Sun Oct 18 07:22:23 2009
@@ -27,6 +27,8 @@
 
 import javax.xml.namespace.QName;
 
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
 import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException;
 import org.apache.tuscany.sca.interfacedef.Operation;
 import org.apache.tuscany.sca.interfacedef.java.JavaInterface;
@@ -47,9 +49,9 @@
 public class PolicyJavaInterfaceVisitor implements JavaInterfaceVisitor {
     private PolicyFactory policyFactory;
 
-    public PolicyJavaInterfaceVisitor(PolicyFactory policyFactory) {
+    public PolicyJavaInterfaceVisitor(ExtensionPointRegistry registry) {
         super();
-        this.policyFactory = policyFactory;
+        this.policyFactory = registry.getExtensionPoint(FactoryExtensionPoint.class).getFactory(PolicyFactory.class);
     }
 
     private QName getQName(String intentName) {

Added: tuscany/java/sca/modules/interface-java/src/main/resources/META-INF/services/org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-java/src/main/resources/META-INF/services/org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor?rev=826368&view=auto
==============================================================================
--- tuscany/java/sca/modules/interface-java/src/main/resources/META-INF/services/org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor (added)
+++ tuscany/java/sca/modules/interface-java/src/main/resources/META-INF/services/org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor Sun Oct 18 07:22:23 2009
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License. 
+org.apache.tuscany.sca.interfacedef.java.impl.PolicyJavaInterfaceVisitor;ranking=1000

Modified: tuscany/java/sca/modules/interface-java/src/test/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceUtilDuplicateRemotableTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-java/src/test/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceUtilDuplicateRemotableTestCase.java?rev=826368&r1=826367&r2=826368&view=diff
==============================================================================
--- tuscany/java/sca/modules/interface-java/src/test/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceUtilDuplicateRemotableTestCase.java (original)
+++ tuscany/java/sca/modules/interface-java/src/test/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceUtilDuplicateRemotableTestCase.java Sun Oct 18 07:22:23 2009
@@ -24,6 +24,8 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.interfacedef.DataType;
 import org.apache.tuscany.sca.interfacedef.Interface;
 import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException;
@@ -167,7 +169,8 @@
     @Test
     public void testDuplicateOpeartionOnRemotableInterface()
     {
-        JavaInterfaceFactory javaFactory = new DefaultJavaInterfaceFactory();
+        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
+        JavaInterfaceFactory javaFactory = new DefaultJavaInterfaceFactory(registry);
         JavaInterfaceIntrospectorImpl introspector = new JavaInterfaceIntrospectorImpl(javaFactory);
         JavaInterfaceImpl javaInterface = new JavaInterfaceImpl();
 

Modified: tuscany/java/sca/modules/interface-java/src/test/java/org/apache/tuscany/sca/interfacedef/java/introspection/impl/PolicyProcessorTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-java/src/test/java/org/apache/tuscany/sca/interfacedef/java/introspection/impl/PolicyProcessorTestCase.java?rev=826368&r1=826367&r2=826368&view=diff
==============================================================================
--- tuscany/java/sca/modules/interface-java/src/test/java/org/apache/tuscany/sca/interfacedef/java/introspection/impl/PolicyProcessorTestCase.java (original)
+++ tuscany/java/sca/modules/interface-java/src/test/java/org/apache/tuscany/sca/interfacedef/java/introspection/impl/PolicyProcessorTestCase.java Sun Oct 18 07:22:23 2009
@@ -20,11 +20,11 @@
 
 import static org.junit.Assert.assertEquals;
 
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.interfacedef.java.DefaultJavaInterfaceFactory;
 import org.apache.tuscany.sca.interfacedef.java.JavaInterface;
 import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory;
-import org.apache.tuscany.sca.interfacedef.java.impl.PolicyJavaInterfaceVisitor;
-import org.apache.tuscany.sca.policy.DefaultPolicyFactory;
 import org.junit.Before;
 import org.junit.Test;
 import org.oasisopen.sca.annotation.Authentication;
@@ -36,13 +36,13 @@
  * @version $Rev$ $Date$
  */
 public class PolicyProcessorTestCase {
-    private JavaInterfaceFactory factory = new DefaultJavaInterfaceFactory();
-    private PolicyJavaInterfaceVisitor policyProcessor;
+    private JavaInterfaceFactory factory;
+    // private PolicyJavaInterfaceVisitor policyProcessor;
 
     @Test
     public void testInterfaceLevel() throws Exception {
         JavaInterface type = factory.createJavaInterface(Interface1.class);
-        policyProcessor.visitInterface(type);
+        // policyProcessor.visitInterface(type);
         assertEquals(2, type.getRequiredIntents().size());
         assertEquals(1, type.getPolicySets().size());
     }
@@ -50,7 +50,7 @@
     @Test
     public void testMethodLevel() throws Exception {
         JavaInterface type = factory.createJavaInterface(Interface2.class);
-        policyProcessor.visitInterface(type);
+        // policyProcessor.visitInterface(type);
         assertEquals(0, type.getRequiredIntents().size());
         assertEquals(3, type.getOperations().get(0).getRequiredIntents().size());
         assertEquals(1, type.getOperations().get(1).getRequiredIntents().size());
@@ -62,7 +62,7 @@
     @Test
     public void testInterfaceAndMethodLevel() throws Exception {
         JavaInterface type = factory.createJavaInterface(Interface3.class);
-        policyProcessor.visitInterface(type);
+        // policyProcessor.visitInterface(type);
         assertEquals(2, type.getRequiredIntents().size());
         assertEquals(1, type.getOperations().get(0).getRequiredIntents().size());
         assertEquals(1, type.getOperations().get(1).getRequiredIntents().size());
@@ -73,7 +73,9 @@
 
     @Before
     public void setUp() throws Exception {
-        policyProcessor = new PolicyJavaInterfaceVisitor(new DefaultPolicyFactory());
+        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
+        factory = new DefaultJavaInterfaceFactory(registry);
+        // policyProcessor = new PolicyJavaInterfaceVisitor(registry);
     }
 
     // @Remotable



Mime
View raw message