tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rf...@apache.org
Subject svn commit: r746356 [4/8] - in /tuscany/java/sca/modules: assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ assembly-xml/src/test/resources/org/apache/tuscany/sca/assembly/xm...
Date Fri, 20 Feb 2009 20:10:44 GMT
Modified: tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java (original)
+++ tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java Fri Feb 20 20:10:37 2009
@@ -26,15 +26,12 @@
 import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint;
 import org.apache.tuscany.sca.host.http.ServletHost;
 import org.apache.tuscany.sca.host.http.ServletHostExtensionPoint;
-import org.apache.tuscany.sca.policy.util.PolicyHandlerDefinitionsLoader;
-import org.apache.tuscany.sca.policy.util.PolicyHandlerTuple;
 import org.apache.tuscany.sca.provider.BindingProviderFactory;
 import org.apache.tuscany.sca.provider.ReferenceBindingProvider;
 import org.apache.tuscany.sca.provider.ServiceBindingProvider;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
 import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
 import org.apache.tuscany.sca.runtime.RuntimeComponentService;
-import org.oasisopen.sca.ServiceRuntimeException;
 
 /**
  * Axis2BindingProviderFactory
@@ -46,7 +43,6 @@
 
     private FactoryExtensionPoint modelFactories;
     private ServletHost servletHost;
-    private List<PolicyHandlerTuple> policyHandlerClassnames = null;
     private DataBindingExtensionPoint dataBindings;
 
     public Axis2BindingProviderFactory(ExtensionPointRegistry extensionPoints) {
@@ -56,7 +52,6 @@
             this.servletHost = hosts.get(0);
         }
         modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
-        policyHandlerClassnames = PolicyHandlerDefinitionsLoader.loadPolicyHandlerClassnames();
         dataBindings = extensionPoints.getExtensionPoint(DataBindingExtensionPoint.class);
     }
 
@@ -64,7 +59,7 @@
                                                                    RuntimeComponentReference reference,
                                                                    WebServiceBinding binding) {
         return new Axis2ReferenceBindingProvider(component, reference, binding,
-                                                 modelFactories, policyHandlerClassnames, dataBindings);
+                                                 modelFactories, dataBindings);
     }
 
     public ServiceBindingProvider createServiceBindingProvider(RuntimeComponent component,
@@ -72,7 +67,7 @@
                                                                WebServiceBinding binding) {
         return new Axis2ServiceBindingProvider(component, service, binding,
                                                servletHost, modelFactories,
-                                               policyHandlerClassnames, dataBindings);
+                                               dataBindings);
     }
     
     public Class<WebServiceBinding> getModelType() {

Modified: tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2OneWayBindingInvoker.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2OneWayBindingInvoker.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2OneWayBindingInvoker.java (original)
+++ tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2OneWayBindingInvoker.java Fri Feb 20 20:10:37 2009
@@ -18,8 +18,6 @@
  */
 package org.apache.tuscany.sca.binding.ws.axis2;
 
-import java.util.List;
-
 import javax.xml.namespace.QName;
 
 import org.apache.axiom.soap.SOAPFactory;
@@ -30,7 +28,6 @@
 import org.apache.axis2.transport.http.HTTPConstants;
 import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
 import org.apache.tuscany.sca.invocation.Message;
-import org.apache.tuscany.sca.policy.util.PolicyHandler;
 
 /**
  * Axis2OneWayBindingInvoker uses an Axis2 OperationClient to invoke a OneWay remote web service.
@@ -43,10 +40,9 @@
                                      QName wsdlOperationName,
                                      Options options,
                                      SOAPFactory soapFactory,
-                                     List<PolicyHandler> policyHandlerList,
                                      WebServiceBinding wsBinding) {
 
-        super(serviceClient, wsdlOperationName, options, soapFactory, policyHandlerList, wsBinding);
+        super(serviceClient, wsdlOperationName, options, soapFactory, wsBinding);
     }
 
     @Override

Modified: tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceBindingProvider.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceBindingProvider.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceBindingProvider.java (original)
+++ tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceBindingProvider.java Fri Feb 20 20:10:37 2009
@@ -18,8 +18,6 @@
  */
 package org.apache.tuscany.sca.binding.ws.axis2;
 
-import java.util.List;
-
 import org.apache.axiom.om.OMElement;
 import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
 import org.apache.tuscany.sca.core.FactoryExtensionPoint;
@@ -28,7 +26,6 @@
 import org.apache.tuscany.sca.interfacedef.Operation;
 import org.apache.tuscany.sca.invocation.Invoker;
 import org.apache.tuscany.sca.invocation.MessageFactory;
-import org.apache.tuscany.sca.policy.util.PolicyHandlerTuple;
 import org.apache.tuscany.sca.provider.ReferenceBindingProvider;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
 import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
@@ -43,7 +40,6 @@
                                          RuntimeComponentReference reference,
                                          WebServiceBinding wsBinding,
                                          FactoryExtensionPoint modelFactories,
-                                         List<PolicyHandlerTuple> policyHandlerClassnames,
                                          DataBindingExtensionPoint dataBindings) {
 
         MessageFactory messageFactory = modelFactories.getFactory(MessageFactory.class); 
@@ -60,7 +56,7 @@
             contract.getInterface().resetDataBinding(OMElement.class.getName());
         }
 
-        axisClient = new Axis2ServiceClient(component, reference, wsBinding, messageFactory, policyHandlerClassnames);
+        axisClient = new Axis2ServiceClient(component, reference, wsBinding, messageFactory);
     }
 
     public void start() {

Modified: tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java (original)
+++ tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java Fri Feb 20 20:10:37 2009
@@ -18,8 +18,6 @@
  */
 package org.apache.tuscany.sca.binding.ws.axis2;
 
-import java.util.List;
-
 import org.apache.axiom.om.OMElement;
 import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
 import org.apache.tuscany.sca.core.FactoryExtensionPoint;
@@ -27,7 +25,6 @@
 import org.apache.tuscany.sca.host.http.ServletHost;
 import org.apache.tuscany.sca.interfacedef.InterfaceContract;
 import org.apache.tuscany.sca.invocation.MessageFactory;
-import org.apache.tuscany.sca.policy.util.PolicyHandlerTuple;
 import org.apache.tuscany.sca.provider.ServiceBindingProvider;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
 import org.apache.tuscany.sca.runtime.RuntimeComponentService;
@@ -43,7 +40,6 @@
                                        WebServiceBinding wsBinding,
                                        ServletHost servletHost,
                                        FactoryExtensionPoint modelFactories,
-                                       List<PolicyHandlerTuple> policyHandlerClassnames,
                                        DataBindingExtensionPoint dataBindings) {
 
         if (servletHost == null) {
@@ -62,7 +58,7 @@
         InterfaceContract contract = wsBinding.getBindingInterfaceContract();
         contract.getInterface().resetDataBinding(OMElement.class.getName());
 
-        axisProvider = new Axis2ServiceProvider(component, service, wsBinding, servletHost, messageFactory, policyHandlerClassnames);
+        axisProvider = new Axis2ServiceProvider(component, service, wsBinding, servletHost, messageFactory);
     }
 
     public void start() {

Modified: tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java (original)
+++ tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java Fri Feb 20 20:10:37 2009
@@ -27,7 +27,6 @@
 import java.security.PrivilegedAction;
 import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
-import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
@@ -74,10 +73,7 @@
 import org.apache.tuscany.sca.invocation.Invoker;
 import org.apache.tuscany.sca.invocation.MessageFactory;
 import org.apache.tuscany.sca.policy.PolicySet;
-import org.apache.tuscany.sca.policy.PolicySetAttachPoint;
-import org.apache.tuscany.sca.policy.util.PolicyHandler;
-import org.apache.tuscany.sca.policy.util.PolicyHandlerTuple;
-import org.apache.tuscany.sca.policy.util.PolicyHandlerUtils;
+import org.apache.tuscany.sca.policy.PolicySubject;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
 import org.apache.tuscany.sca.xsd.xml.XMLDocumentHelper;
 import org.apache.ws.commons.schema.resolver.URIResolver;
@@ -89,19 +85,15 @@
     private AbstractContract contract;
     private WebServiceBinding wsBinding;
     private ServiceClient serviceClient;
-    List<PolicyHandlerTuple> policyHandlerClassnames = null;
-    private List<PolicyHandler> policyHandlerList = new ArrayList<PolicyHandler>();
 
     public Axis2ServiceClient(RuntimeComponent component,
                               AbstractContract contract,
                               WebServiceBinding wsBinding,
-                              MessageFactory messageFactory,
-                              List<PolicyHandlerTuple> policyHandlerClassnames) {
+                              MessageFactory messageFactory) {
 
         this.component = component;
         this.contract = contract;
         this.wsBinding = wsBinding;
-        this.policyHandlerClassnames = policyHandlerClassnames;
     }
 
     protected void start() {
@@ -156,7 +148,6 @@
             }
 
             createPolicyHandlers();
-            setupPolicyHandlers(policyHandlerList, configContext);
 
             Definition definition = wsBinding.getWSDLDocument();
             QName serviceQName = wsBinding.getService().getQName();
@@ -374,9 +365,9 @@
         }
         Axis2BindingInvoker invoker;
         if (operation.isNonBlocking()) {
-            invoker = new Axis2OneWayBindingInvoker(this, wsdlOperationQName, options, soapFactory, policyHandlerList, wsBinding);
+            invoker = new Axis2OneWayBindingInvoker(this, wsdlOperationQName, options, soapFactory, wsBinding);
         } else {
-            invoker = new Axis2BindingInvoker(this, wsdlOperationQName, options, soapFactory, policyHandlerList, wsBinding);
+            invoker = new Axis2BindingInvoker(this, wsdlOperationQName, options, soapFactory, wsBinding);
         }
         
         return invoker;
@@ -465,16 +456,7 @@
     }
 
     private void createPolicyHandlers() throws IllegalAccessException, InstantiationException, ClassNotFoundException {
-        if (wsBinding instanceof PolicySetAttachPoint) {
-            PolicySetAttachPoint policiedBinding = (PolicySetAttachPoint)wsBinding;
-            PolicyHandler policyHandler = null;
-            for (PolicySet policySet : policiedBinding.getPolicySets()) {
-                policyHandler = PolicyHandlerUtils.findPolicyHandler(policySet, policyHandlerClassnames);
-                if (policyHandler != null) {
-                    policyHandler.setApplicablePolicySet(policySet);
-                    policyHandlerList.add(policyHandler);
-                }
-            }
+        if (wsBinding instanceof PolicySubject) {
             
             // code to create policy handlers using the new policy SPI based
             // on policy providers
@@ -491,10 +473,5 @@
         }
     }
 
-    private void setupPolicyHandlers(List<PolicyHandler> policyHandlers, ConfigurationContext configContext) {
-        for (PolicyHandler aHandler : policyHandlers) {
-            aHandler.setUp(configContext);
-        }
-    }
 
 }

Modified: tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInMessageReceiver.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInMessageReceiver.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInMessageReceiver.java (original)
+++ tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInMessageReceiver.java Fri Feb 20 20:10:37 2009
@@ -19,14 +19,12 @@
 package org.apache.tuscany.sca.binding.ws.axis2;
 
 import java.lang.reflect.InvocationTargetException;
-import java.util.List;
 
 import org.apache.axiom.om.OMElement;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.receivers.AbstractInMessageReceiver;
 import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.policy.util.PolicyHandler;
 
 public class Axis2ServiceInMessageReceiver extends AbstractInMessageReceiver {
 
@@ -34,12 +32,9 @@
 
     private Axis2ServiceProvider provider;
     
-    private List<PolicyHandler> policyHandlerList = null;
-
-    public Axis2ServiceInMessageReceiver(Axis2ServiceProvider provider, Operation operation, List<PolicyHandler> policyHandlerList) {
+    public Axis2ServiceInMessageReceiver(Axis2ServiceProvider provider, Operation operation) {
         this.provider = provider;
         this.operation = operation;
-        this.policyHandlerList = policyHandlerList;
     }
 
     public Axis2ServiceInMessageReceiver() {
@@ -51,20 +46,8 @@
             OMElement requestOM = inMC.getEnvelope().getBody().getFirstElement();
             Object[] args = new Object[] {requestOM};
             
-            /*
-            for ( PolicyHandler policyHandler : policyHandlerList ) {
-                policyHandler.beforeInvoke(operation, args, inMC);
-            }
-            */
-            
             provider.invokeTarget(operation, args, inMC);
             
-            /*
-            for ( PolicyHandler policyHandler : policyHandlerList ) {
-                policyHandler.afterInvoke(operation, args, inMC);
-            }
-            */
-
         } catch (InvocationTargetException e) {
             Throwable t = e.getCause();
             if (t instanceof Exception) {

Modified: tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInOutSyncMessageReceiver.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInOutSyncMessageReceiver.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInOutSyncMessageReceiver.java (original)
+++ tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInOutSyncMessageReceiver.java Fri Feb 20 20:10:37 2009
@@ -19,7 +19,6 @@
 package org.apache.tuscany.sca.binding.ws.axis2;
 
 import java.lang.reflect.InvocationTargetException;
-import java.util.List;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -31,21 +30,18 @@
 import org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver;
 import org.apache.tuscany.sca.interfacedef.Operation;
 import org.apache.tuscany.sca.interfacedef.util.FaultException;
-import org.apache.tuscany.sca.policy.util.PolicyHandler;
 import org.oasisopen.sca.ServiceRuntimeException;
 
 public class Axis2ServiceInOutSyncMessageReceiver extends AbstractInOutSyncMessageReceiver {
     private static final Logger logger = Logger.getLogger(Axis2ServiceInOutSyncMessageReceiver.class.getName());
 	
     protected Operation operation;
-    private List<PolicyHandler> policyHandlerList = null;
 
     private Axis2ServiceProvider provider;
 
-    public Axis2ServiceInOutSyncMessageReceiver(Axis2ServiceProvider provider, Operation operation, List<PolicyHandler> policyHandlerList) {
+    public Axis2ServiceInOutSyncMessageReceiver(Axis2ServiceProvider provider, Operation operation) {
         this.provider = provider;
         this.operation = operation;
-        this.policyHandlerList = policyHandlerList;
     }
 
     public Axis2ServiceInOutSyncMessageReceiver() {

Modified: tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java (original)
+++ tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java Fri Feb 20 20:10:37 2009
@@ -91,11 +91,8 @@
 import org.apache.tuscany.sca.invocation.Message;
 import org.apache.tuscany.sca.invocation.MessageFactory;
 import org.apache.tuscany.sca.policy.PolicySet;
-import org.apache.tuscany.sca.policy.PolicySetAttachPoint;
+import org.apache.tuscany.sca.policy.PolicySubject;
 import org.apache.tuscany.sca.policy.authentication.basic.BasicAuthenticationPolicy;
-import org.apache.tuscany.sca.policy.util.PolicyHandler;
-import org.apache.tuscany.sca.policy.util.PolicyHandlerTuple;
-import org.apache.tuscany.sca.policy.util.PolicyHandlerUtils;
 import org.apache.tuscany.sca.runtime.EndpointReference;
 import org.apache.tuscany.sca.runtime.ReferenceParameters;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
@@ -128,8 +125,6 @@
     private ConfigurationContext configContext;
     private JMSSender jmsSender;
     private JMSListener jmsListener;
-    private List<PolicyHandlerTuple> policyHandlerClassnames = null;
-    private List<PolicyHandler> policyHandlerList = new ArrayList<PolicyHandler>();
     private Map<String, Port> urlMap = new HashMap<String, Port>();
     
     private BasicAuthenticationPolicy basicAuthenticationPolicy = null;
@@ -166,15 +161,13 @@
                                 AbstractContract contract,
                                 WebServiceBinding wsBinding,
                                 ServletHost servletHost,
-                                MessageFactory messageFactory,
-                                List<PolicyHandlerTuple> policyHandlerClassnames) {
+                                MessageFactory messageFactory) {
 
         this.component = component; 
         this.contract = contract; 
         this.wsBinding = wsBinding;
         this.servletHost = servletHost;
         this.messageFactory = messageFactory;
-        this.policyHandlerClassnames = policyHandlerClassnames;
 
         final boolean isRampartRequired = AxisPolicyHelper.isRampartRequired(wsBinding);
         try {
@@ -214,9 +207,10 @@
             urlMap.put(endpointURI, (Port)port);
         }
         
+        /*
         // find out which policies are active
-        if (wsBinding instanceof PolicySetAttachPoint) {
-            List<PolicySet> policySets = ((PolicySetAttachPoint)wsBinding).getApplicablePolicySets();
+        if (wsBinding instanceof PolicySubject) {
+            List<PolicySet> policySets = ((PolicySubject)wsBinding).getApplicablePolicySets();
             for (PolicySet ps : policySets) {
                 for (Object p : ps.getPolicies()) {
                     if (BasicAuthenticationPolicy.class.isInstance(p)) {
@@ -230,7 +224,8 @@
                     }
                 }
             }
-        }        
+        } 
+        */       
     }
 
     static String getPortAddress(Port port) {
@@ -319,7 +314,6 @@
                 AxisService axisService = createAxisService(entry.getKey(), entry.getValue());
                 configContext.getAxisConfiguration().addService(axisService);
             }
-            setupPolicyHandlers(policyHandlerList, configContext);
           
             Axis2ServiceServlet servlet = null;
             for (String endpointURL : urlMap.keySet()) {
@@ -640,9 +634,9 @@
 
                 MessageReceiver msgrec = null;
                 if (op.isNonBlocking()) {
-                    msgrec = new Axis2ServiceInMessageReceiver(this, op, policyHandlerList);
+                    msgrec = new Axis2ServiceInMessageReceiver(this, op);
                 } else {
-                    msgrec = new Axis2ServiceInOutSyncMessageReceiver(this, op, policyHandlerList);
+                    msgrec = new Axis2ServiceInOutSyncMessageReceiver(this, op);
                 }
                 axisOp.setMessageReceiver(msgrec);
             }
@@ -739,10 +733,6 @@
             parameters.setConversationID(conversationID);
         }
 
-        for ( PolicyHandler policyHandler : policyHandlerList ) {
-            policyHandler.beforeInvoke(msg, inMC);
-        }
-                
         if (basicAuthenticationPolicy != null) {
             Axis2BindingBasicAuthenticationConfigurator.parseHTTPHeader(inMC, msg, basicAuthenticationPolicy);
         }
@@ -751,10 +741,6 @@
         RuntimeWire wire = ((RuntimeComponentService)contract).getRuntimeWire(getBinding());
         Object response =  wire.invoke(op, msg);
         
-        for ( PolicyHandler policyHandler : policyHandlerList ) {
-            policyHandler.afterInvoke(response, inMC);
-        }        
-        
         return response;
     }
 
@@ -772,28 +758,10 @@
         return wsBinding;
     }
     
-    private void setupPolicyHandlers(List<PolicyHandler> policyHandlers, ConfigurationContext configContext)  {
-        for ( PolicyHandler aHandler : policyHandlers ) {
-            aHandler.setUp(configContext);
-        }
-    }
-    
     private void createPolicyHandlers() throws IllegalAccessException,
                                                InstantiationException, 
                                                ClassNotFoundException {
-        if (wsBinding instanceof PolicySetAttachPoint) {
-            PolicySetAttachPoint policiedBinding = (PolicySetAttachPoint)wsBinding;
-            PolicyHandler policyHandler = null;
-            
-            for (PolicySet policySet : policiedBinding.getPolicySets()) {
-                policyHandler =
-                    PolicyHandlerUtils.findPolicyHandler(policySet, policyHandlerClassnames);
-                
-                if (policyHandler != null) {
-                    policyHandler.setApplicablePolicySet(policySet);
-                    policyHandlerList.add(policyHandler);
-                } 
-            }
+        if (wsBinding instanceof PolicySubject) {
             
             // code to create policy handlers using a policy SPI based
             // on policy providers

Modified: tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/AxisPolicyHelper.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/AxisPolicyHelper.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/AxisPolicyHelper.java (original)
+++ tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/AxisPolicyHelper.java Fri Feb 20 20:10:37 2009
@@ -25,9 +25,9 @@
 
 import org.apache.tuscany.sca.assembly.Binding;
 import org.apache.tuscany.sca.policy.Intent;
-import org.apache.tuscany.sca.policy.IntentAttachPoint;
+import org.apache.tuscany.sca.policy.PolicySubject;
 import org.apache.tuscany.sca.policy.PolicySet;
-import org.apache.tuscany.sca.policy.PolicySetAttachPoint;
+import org.apache.tuscany.sca.policy.PolicySubject;
 
 /**
  * @version $Rev$ $Date$
@@ -44,8 +44,8 @@
     public static PolicySet getPolicySet(Binding wsBinding, QName intentName) {
         PolicySet returnPolicySet = null;
 
-        if (wsBinding instanceof PolicySetAttachPoint) {
-            PolicySetAttachPoint policiedBinding = (PolicySetAttachPoint)wsBinding;
+        if (wsBinding instanceof PolicySubject) {
+            PolicySubject policiedBinding = (PolicySubject)wsBinding;
             for (PolicySet policySet : policiedBinding.getPolicySets()) {
                 for (Intent intent : policySet.getProvidedIntents()) {
                     if (intent.getName().equals(intentName)) {
@@ -60,8 +60,8 @@
     }
 
     public static boolean isIntentRequired(Binding wsBinding, QName intent) {
-        if (wsBinding instanceof IntentAttachPoint) {
-            List<Intent> intents = ((IntentAttachPoint)wsBinding).getRequiredIntents();
+        if (wsBinding instanceof PolicySubject) {
+            List<Intent> intents = ((PolicySubject)wsBinding).getRequiredIntents();
             for (Intent i : intents) {
                 if (intent.equals(i.getName())) {
                     return true;

Modified: tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/definitions.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/definitions.xml?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/definitions.xml (original)
+++ tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/definitions.xml Fri Feb 20 20:10:37 2009
@@ -20,9 +20,9 @@
 
 <!-- $Rev$ $Date$ -->
 
-<sca:definitions xmlns="http://www.osoa.org/xmlns/sca/1.0"
-            targetNamespace="http://www.osoa.org/xmlns/sca/1.0"
-            xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
+<sca:definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200712"
+            targetNamespace="http://docs.oasis-open.org/ns/opencsa/sca/200712"
+            xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200712"
             xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0">
             
     <sca:bindingType type="sca:binding.ws"  mayProvide="SOAP SOAP.1_1 SOAP.1_2 MTOM" alwaysProvides=""/>

Modified: tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/definitions.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/definitions.xml?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/definitions.xml (original)
+++ tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/definitions.xml Fri Feb 20 20:10:37 2009
@@ -17,9 +17,9 @@
  * specific language governing permissions and limitations
  * under the License.    
 -->
-<sca:definitions xmlns="http://www.osoa.org/xmlns/sca/1.0"
+<sca:definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200712"
  			targetNamespace="http://tuscany.apache.org/xmlns/sca/1.0"
- 			xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
+ 			xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200712"
  			xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0">
 
  <!-- WS Security POLICY SETS -->

Modified: tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/intent/definitions.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/intent/definitions.xml?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/intent/definitions.xml (original)
+++ tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/intent/definitions.xml Fri Feb 20 20:10:37 2009
@@ -17,9 +17,9 @@
  * specific language governing permissions and limitations
  * under the License.    
 -->
-<sca:definitions xmlns="http://www.osoa.org/xmlns/sca/1.0"
+<sca:definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200712"
  			targetNamespace="http://tuscany.apache.org/xmlns/sca/1.0"
- 			xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
+ 			xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200712"
  			xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0">
 
  <sca:intent name="wsAuthentication" 

Modified: tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/definitions.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/definitions.xml?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/definitions.xml (original)
+++ tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/definitions.xml Fri Feb 20 20:10:37 2009
@@ -17,9 +17,9 @@
  * specific language governing permissions and limitations
  * under the License.    
 -->
-<sca:definitions xmlns="http://www.osoa.org/xmlns/sca/1.0"
+<sca:definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200712"
  			targetNamespace="http://tuscany.apache.org/xmlns/sca/1.0"
- 			xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
+ 			xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200712"
  			xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0">
 
  <!-- WS Security POLICY SETS -->

Modified: tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/definitions.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/definitions.xml?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/definitions.xml (original)
+++ tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/definitions.xml Fri Feb 20 20:10:37 2009
@@ -17,9 +17,9 @@
  * specific language governing permissions and limitations
  * under the License.    
 -->
-<sca:definitions xmlns="http://www.osoa.org/xmlns/sca/1.0"
+<sca:definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200712"
  			targetNamespace="http://tuscany.apache.org/xmlns/sca/1.0"
- 			xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
+ 			xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200712"
  			xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0">
  
  <!-- WS Security POLICY SETS -->

Modified: tuscany/java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java (original)
+++ tuscany/java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java Fri Feb 20 20:10:37 2009
@@ -51,7 +51,7 @@
 import org.apache.tuscany.sca.monitor.Problem;
 import org.apache.tuscany.sca.monitor.Problem.Severity;
 import org.apache.tuscany.sca.policy.Intent;
-import org.apache.tuscany.sca.policy.IntentAttachPoint;
+import org.apache.tuscany.sca.policy.PolicySubject;
 import org.apache.tuscany.sca.xsd.XSDFactory;
 
 /**
@@ -269,8 +269,8 @@
     }
 
     protected static boolean requiresSOAP12(WebServiceBinding wsBinding) {
-        if (wsBinding instanceof IntentAttachPoint) {
-            List<Intent> intents = ((IntentAttachPoint)wsBinding).getRequiredIntents();
+        if (wsBinding instanceof PolicySubject) {
+            List<Intent> intents = ((PolicySubject)wsBinding).getRequiredIntents();
             for (Intent intent : intents) {
                 if (SOAP12_INTENT.equals(intent.getName())) {
                     return true;

Modified: tuscany/java/sca/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java (original)
+++ tuscany/java/sca/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java Fri Feb 20 20:10:37 2009
@@ -33,11 +33,8 @@
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
 
-import org.apache.tuscany.sca.assembly.ConfiguredOperation;
-import org.apache.tuscany.sca.assembly.OperationsConfigurator;
-import org.apache.tuscany.sca.assembly.xml.ConfiguredOperationProcessor;
 import org.apache.tuscany.sca.assembly.xml.Constants;
-import org.apache.tuscany.sca.assembly.xml.PolicyAttachPointProcessor;
+import org.apache.tuscany.sca.assembly.xml.PolicySubjectProcessor;
 import org.apache.tuscany.sca.binding.ws.DefaultWebServiceBindingFactory;
 import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
 import org.apache.tuscany.sca.binding.ws.WebServiceBindingFactory;
@@ -59,7 +56,6 @@
 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.IntentAttachPointTypeFactory;
 import org.apache.tuscany.sca.policy.PolicyFactory;
 
 /**
@@ -73,9 +69,8 @@
     private WSDLFactory wsdlFactory;
     private WebServiceBindingFactory wsFactory;
     private PolicyFactory policyFactory;
-    private PolicyAttachPointProcessor policyProcessor;
-    private IntentAttachPointTypeFactory intentAttachPointTypeFactory;
-    private ConfiguredOperationProcessor configuredOperationProcessor;
+    private PolicySubjectProcessor policyProcessor;
+    private PolicyFactory intentAttachPointTypeFactory;
     private Monitor monitor;
     
     public WebServiceBindingProcessor(ExtensionPointRegistry extensionPoints) {
@@ -84,14 +79,13 @@
         this.policyFactory = modelFactories.getFactory(PolicyFactory.class);
         this.wsFactory = new DefaultWebServiceBindingFactory();
         this.wsdlFactory = modelFactories.getFactory(WSDLFactory.class);
-        this.policyProcessor = new PolicyAttachPointProcessor(policyFactory);
-        this.intentAttachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class);
+        this.policyProcessor = new PolicySubjectProcessor(policyFactory);
+        this.intentAttachPointTypeFactory = modelFactories.getFactory(PolicyFactory.class);
         UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
         MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
         if (monitorFactory != null) {
             this.monitor = monitorFactory.createMonitor();
         }
-        this.configuredOperationProcessor = new ConfiguredOperationProcessor(modelFactories, this.monitor);
     }
     
     /**
@@ -126,10 +120,10 @@
 
         // Read a <binding.ws>
         WebServiceBinding wsBinding = wsFactory.createWebServiceBinding();
-        /*IntentAttachPointType bindingType = intentAttachPointTypeFactory.createBindingType();
+        /*ExtensionType bindingType = intentAttachPointTypeFactory.createBindingType();
         bindingType.setName(getArtifactType());
         bindingType.setUnresolved(true);
-        ((PolicySetAttachPoint)wsBinding).setType(bindingType);*/
+        ((PolicySubject)wsBinding).setType(bindingType);*/
         wsBinding.setUnresolved(true);
         wsBinding.setBuilder(new BindingBuilderImpl(extensionPoints));
 
@@ -209,7 +203,6 @@
         // Read wsdlLocation
         wsBinding.setLocation(reader.getAttributeValue(WSDLI_NS, WSDL_LOCATION));
 
-        ConfiguredOperation confOp = null;
         // Skip to end element
         while (reader.hasNext()) {
             int event = reader.next();
@@ -221,12 +214,7 @@
                             throw new ContributionReadException(wsdlElement + " must use wsdl.binding when using wsa:EndpointReference");
                         }
                         wsBinding.setEndPointReference(EndPointReferenceHelper.readEndPointReference(reader));
-                    } else if (Constants.OPERATION_QNAME.equals(reader.getName())) {
-                        confOp = configuredOperationProcessor.read(reader);
-                        if (confOp != null) {
-                            ((OperationsConfigurator)wsBinding).getConfiguredOperations().add(confOp);
-                        }
-                    }
+                    } 
                 }
                     break;
 
@@ -373,11 +361,6 @@
                 model.setBindingInterfaceContract(interfaceContract);
             }
         }
-        policyProcessor.resolvePolicies(model, resolver);
-        OperationsConfigurator opCongigurator = (OperationsConfigurator)model;
-        for (ConfiguredOperation confOp : opCongigurator.getConfiguredOperations()) {
-            policyProcessor.resolvePolicies(confOp, resolver);
-        }
     }
 
     private PortType getPortType(WebServiceBinding model) {

Modified: tuscany/java/sca/modules/binding-ws-xml/src/test/java/org/apache/tuscany/sca/binding/ws/xml/ReadTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-xml/src/test/java/org/apache/tuscany/sca/binding/ws/xml/ReadTestCase.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-xml/src/test/java/org/apache/tuscany/sca/binding/ws/xml/ReadTestCase.java (original)
+++ tuscany/java/sca/modules/binding-ws-xml/src/test/java/org/apache/tuscany/sca/binding/ws/xml/ReadTestCase.java Fri Feb 20 20:10:37 2009
@@ -19,7 +19,6 @@
 
 package org.apache.tuscany.sca.binding.ws.xml;
 
-import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNotSame;
 import static org.junit.Assert.fail;
@@ -31,7 +30,6 @@
 
 import org.apache.tuscany.sca.assembly.ComponentType;
 import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.assembly.OperationsConfigurator;
 import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
 import org.apache.tuscany.sca.assembly.builder.CompositeBuilderExtensionPoint;
 import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
@@ -90,8 +88,6 @@
 
         compositeBuilder.build(composite, null, null);
 
-        assertEquals(((OperationsConfigurator)composite.getServices().get(0).getBindings().get(0))
-            .getConfiguredOperations().get(0).getRequiredIntents().size(), 2);
     }
 
     /**

Modified: tuscany/java/sca/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java (original)
+++ tuscany/java/sca/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java Fri Feb 20 20:10:37 2009
@@ -28,20 +28,18 @@
 import javax.wsdl.Service;
 import javax.xml.namespace.QName;
 
-import org.apache.tuscany.sca.assembly.ConfiguredOperation;
 import org.apache.tuscany.sca.assembly.Extensible;
 import org.apache.tuscany.sca.assembly.Extension;
-import org.apache.tuscany.sca.assembly.OperationsConfigurator;
 import org.apache.tuscany.sca.assembly.builder.BindingBuilder;
 import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
 import org.apache.tuscany.sca.interfacedef.Interface;
 import org.apache.tuscany.sca.interfacedef.InterfaceContract;
 import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition;
 import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface;
+import org.apache.tuscany.sca.policy.ExtensionType;
 import org.apache.tuscany.sca.policy.Intent;
-import org.apache.tuscany.sca.policy.IntentAttachPointType;
 import org.apache.tuscany.sca.policy.PolicySet;
-import org.apache.tuscany.sca.policy.PolicySetAttachPoint;
+import org.apache.tuscany.sca.policy.PolicySubject;
 import org.w3c.dom.Element;
 
 /**
@@ -49,7 +47,7 @@
  *
  * @version $Rev$ $Date$
  */
-class WebServiceBindingImpl implements WebServiceBinding, PolicySetAttachPoint, Extensible, OperationsConfigurator {
+class WebServiceBindingImpl implements WebServiceBinding, PolicySubject, Extensible {
     private String name;
     private String uri;
     private boolean unresolved;
@@ -57,9 +55,7 @@
     private List<Extension> attributeExtensions = new ArrayList<Extension>();
     private List<Intent> requiredIntents = new ArrayList<Intent>();
     private List<PolicySet> policySets = new ArrayList<PolicySet>();
-    private IntentAttachPointType intentAttachPointType;
-    private List<ConfiguredOperation>  configuredOperations = new ArrayList<ConfiguredOperation>();
-    private List<PolicySet> applicablePolicySets = new ArrayList<PolicySet>();
+    private ExtensionType intentAttachPointType;
     private String location;
     private Binding binding;
     private Service service;
@@ -268,11 +264,11 @@
         return requiredIntents;
     }
 
-    public IntentAttachPointType getType() {
+    public ExtensionType getType() {
         return intentAttachPointType;
     }
     
-    public void setType(IntentAttachPointType intentAttachPointType) {
+    public void setType(ExtensionType intentAttachPointType) {
         this.intentAttachPointType = intentAttachPointType;
     }
 
@@ -299,24 +295,4 @@
     public void setBuilder(BindingBuilder builder) {
         this.builder = builder;
     }
-
-    public void setPolicySets(List<PolicySet> policySets) {
-        this.policySets = policySets; 
-    }
-
-    public void setRequiredIntents(List<Intent> intents) {
-        this.requiredIntents = intents;
-    }
-    
-    public List<ConfiguredOperation> getConfiguredOperations() {
-        return configuredOperations;
-    }
-
-    public void setConfiguredOperations(List<ConfiguredOperation> configuredOperations) {
-        this.configuredOperations = configuredOperations;
-    }
-
-    public List<PolicySet> getApplicablePolicySets() {
-        return applicablePolicySets;
-    }
 }

Modified: tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultStAXArtifactProcessorExtensionPoint.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultStAXArtifactProcessorExtensionPoint.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultStAXArtifactProcessorExtensionPoint.java (original)
+++ tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultStAXArtifactProcessorExtensionPoint.java Fri Feb 20 20:10:37 2009
@@ -148,7 +148,7 @@
     /**
      * Lazily load artifact processors registered in the extension point.
      */
-    private void loadArtifactProcessors() {
+    private synchronized void loadArtifactProcessors() {
         if (loaded)
             return;
 

Modified: tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultStAXAttributeProcessorExtensionPoint.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultStAXAttributeProcessorExtensionPoint.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultStAXAttributeProcessorExtensionPoint.java (original)
+++ tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultStAXAttributeProcessorExtensionPoint.java Fri Feb 20 20:10:37 2009
@@ -144,7 +144,7 @@
     /**
      * Lazily load artifact processors registered in the extension point.
      */
-    private void loadArtifactProcessors() {
+    private synchronized void loadArtifactProcessors() {
         if (loaded)
             return;
 

Modified: tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultURLArtifactProcessorExtensionPoint.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultURLArtifactProcessorExtensionPoint.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultURLArtifactProcessorExtensionPoint.java (original)
+++ tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultURLArtifactProcessorExtensionPoint.java Fri Feb 20 20:10:37 2009
@@ -117,7 +117,7 @@
     /**
      * Lazily load artifact processors registered in the extension point.
      */
-    private void loadProcessors() {
+    private synchronized void loadProcessors() {
         if (loaded)
             return;
 

Modified: tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultValidationSchemaExtensionPoint.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultValidationSchemaExtensionPoint.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultValidationSchemaExtensionPoint.java (original)
+++ tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultValidationSchemaExtensionPoint.java Fri Feb 20 20:10:37 2009
@@ -51,7 +51,7 @@
      * Load schema declarations from META-INF/services/
      * org.apache.tuscany.sca.contribution.processor.ValidationSchema files
      */
-    private void loadSchemas() {
+    private synchronized void loadSchemas() {
         if (loaded)
             return;
 

Modified: tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/resolver/DefaultModelResolverExtensionPoint.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/resolver/DefaultModelResolverExtensionPoint.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/resolver/DefaultModelResolverExtensionPoint.java (original)
+++ tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/resolver/DefaultModelResolverExtensionPoint.java Fri Feb 20 20:10:37 2009
@@ -89,7 +89,7 @@
     /**
      * Dynamically load model resolvers declared under META-INF/services
      */
-    private void loadModelResolvers() {
+    private synchronized void loadModelResolvers() {
         if (loadedResolvers != null)
             return;
         loadedResolvers = new HashMap<String, ServiceDeclaration>();

Modified: tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/scanner/DefaultContributionScannerExtensionPoint.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/scanner/DefaultContributionScannerExtensionPoint.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/scanner/DefaultContributionScannerExtensionPoint.java (original)
+++ tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/scanner/DefaultContributionScannerExtensionPoint.java Fri Feb 20 20:10:37 2009
@@ -57,7 +57,7 @@
         return scanners.get(contentType);
     }
 
-    private void loadScanners() {
+    private synchronized void loadScanners() {
         if (loaded)
             return;
 

Modified: tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/endpointresolver/DefaultEndpointResolverFactoryExtensionPoint.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/endpointresolver/DefaultEndpointResolverFactoryExtensionPoint.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/endpointresolver/DefaultEndpointResolverFactoryExtensionPoint.java (original)
+++ tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/endpointresolver/DefaultEndpointResolverFactoryExtensionPoint.java Fri Feb 20 20:10:37 2009
@@ -92,7 +92,7 @@
      * Load provider factories declared under META-INF/services.
      * @param registry
      */
-    private void loadProviderFactories() {
+    private synchronized void loadProviderFactories() {
         if (loaded)
             return;
 

Modified: tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultDefinitionsProviderExtensionPoint.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultDefinitionsProviderExtensionPoint.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultDefinitionsProviderExtensionPoint.java (original)
+++ tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultDefinitionsProviderExtensionPoint.java Fri Feb 20 20:10:37 2009
@@ -38,6 +38,7 @@
 
     private ExtensionPointRegistry extensionPointRegistry = null;
     
+    private boolean loaded;
     private List<DefinitionsProvider> scaDefnsProviders = new ArrayList<DefinitionsProvider>();
     
     public DefaultDefinitionsProviderExtensionPoint(ExtensionPointRegistry extnPtReg) {
@@ -53,13 +54,14 @@
     }
 
     public List<DefinitionsProvider> getDefinitionsProviders() {
-        if (scaDefnsProviders.isEmpty()) {
-            loadProviders();
-        }
+        loadProviders();
         return scaDefnsProviders;
     }
 
-    private void loadProviders() {
+    private synchronized void loadProviders() {
+        if(loaded) {
+            return;
+        }
         // Get the provider service declarations
         Set<ServiceDeclaration> defnProviderDecls;
         DefinitionsProvider aProvider = null;
@@ -86,6 +88,6 @@
         } catch (Exception e) {
             throw new RuntimeException(e);
         }
-
+        loaded = true;
     }
 }

Modified: tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultProviderFactoryExtensionPoint.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultProviderFactoryExtensionPoint.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultProviderFactoryExtensionPoint.java (original)
+++ tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultProviderFactoryExtensionPoint.java Fri Feb 20 20:10:37 2009
@@ -106,7 +106,7 @@
      * Load provider factories declared under META-INF/services.
      * @param registry
      */
-    private void loadProviderFactories() {
+    private synchronized void loadProviderFactories() {
         if (loaded)
             return;
 

Modified: tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/PolicyProviderFactory.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/PolicyProviderFactory.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/PolicyProviderFactory.java (original)
+++ tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/PolicyProviderFactory.java Fri Feb 20 20:10:37 2009
@@ -21,7 +21,6 @@
 
 import org.apache.tuscany.sca.assembly.Binding;
 import org.apache.tuscany.sca.assembly.Implementation;
-import org.apache.tuscany.sca.policy.Policy;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
 import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
 import org.apache.tuscany.sca.runtime.RuntimeComponentService;
@@ -29,7 +28,7 @@
 /**
  * @version $Rev$ $Date$
  */
-public interface PolicyProviderFactory<M extends Policy> extends ProviderFactory<M> {
+public interface PolicyProviderFactory<M> extends ProviderFactory<M> {
     /**
      * Create policy provider for a given reference binding
      * @param component

Modified: tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/DefaultTransformerExtensionPoint.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/DefaultTransformerExtensionPoint.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/DefaultTransformerExtensionPoint.java (original)
+++ tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/DefaultTransformerExtensionPoint.java Fri Feb 20 20:10:37 2009
@@ -109,7 +109,7 @@
      * 
      * @param transformerClass
      */
-    private void loadTransformers(Class<?> transformerClass) {
+    private synchronized void loadTransformers(Class<?> transformerClass) {
 
         // Get the transformer service declarations
         Set<ServiceDeclaration> transformerDeclarations;

Modified: tuscany/java/sca/modules/definitions-xml/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/definitions-xml/pom.xml?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/definitions-xml/pom.xml (original)
+++ tuscany/java/sca/modules/definitions-xml/pom.xml Fri Feb 20 20:10:37 2009
@@ -39,6 +39,7 @@
             <groupId>org.apache.tuscany.sca</groupId>
             <artifactId>tuscany-policy-xml</artifactId>
             <version>2.0-SNAPSHOT</version>
+            <scope>runtime</scope>
         </dependency>
         
         <dependency>

Modified: tuscany/java/sca/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsDocumentProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsDocumentProcessor.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsDocumentProcessor.java (original)
+++ tuscany/java/sca/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsDocumentProcessor.java Fri Feb 20 20:10:37 2009
@@ -27,8 +27,8 @@
 import java.security.AccessController;
 import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
-import java.util.HashMap;
-import java.util.Map;
+import java.util.HashSet;
+import java.util.Set;
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLInputFactory;
@@ -48,8 +48,9 @@
 import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.monitor.Problem;
 import org.apache.tuscany.sca.monitor.Problem.Severity;
+import org.apache.tuscany.sca.policy.BindingType;
+import org.apache.tuscany.sca.policy.ImplementationType;
 import org.apache.tuscany.sca.policy.Intent;
-import org.apache.tuscany.sca.policy.IntentAttachPointType;
 import org.apache.tuscany.sca.policy.PolicySet;
 
 /**
@@ -73,9 +74,9 @@
      * @param staxProcessor
      */
     public DefinitionsDocumentProcessor(StAXArtifactProcessor<Object> staxProcessor,
-                                           XMLInputFactory inputFactory,
-                                           DefinitionsFactory definitionsFactory,
-                                           Monitor monitor) {
+                                        XMLInputFactory inputFactory,
+                                        DefinitionsFactory definitionsFactory,
+                                        Monitor monitor) {
         this.extensionProcessor = (StAXArtifactProcessor<Object>)staxProcessor;
         this.inputFactory = inputFactory;
         this.definitionsFactory = definitionsFactory;
@@ -89,8 +90,8 @@
      * @param staxProcessor
      */
     public DefinitionsDocumentProcessor(FactoryExtensionPoint modelFactories,
-                                           StAXArtifactProcessor<Object> staxProcessor,
-                                           Monitor monitor) {
+                                        StAXArtifactProcessor<Object> staxProcessor,
+                                        Monitor monitor) {
         this.extensionProcessor = (StAXArtifactProcessor<Object>)staxProcessor;
         this.inputFactory = modelFactories.getFactory(XMLInputFactory.class);
         this.definitionsFactory = modelFactories.getFactory(DefinitionsFactory.class);
@@ -198,36 +199,22 @@
             }
         }
     }
-    
+
     private static void stripDuplicates(Definitions scaDefns) {
-        Map<QName, Intent> definedIntents = new HashMap<QName, Intent>();
-        for (Intent intent : scaDefns.getIntents()) {
-            definedIntents.put(intent.getName(), intent);
-        }
+        Set<Intent> definedIntents = new HashSet<Intent>(scaDefns.getIntents());
+        Set<PolicySet> definedPolicySets = new HashSet<PolicySet>(scaDefns.getPolicySets());
+
+        Set<BindingType> definedBindingTypes = new HashSet<BindingType>(scaDefns.getBindingTypes());
+        Set<ImplementationType> definedImplTypes = new HashSet<ImplementationType>(scaDefns.getImplementationTypes());
 
-        Map<QName, PolicySet> definedPolicySets = new HashMap<QName, PolicySet>();
-        for (PolicySet policySet : scaDefns.getPolicySets()) {
-            definedPolicySets.put(policySet.getName(), policySet);
-        }
-        
-        Map<QName, IntentAttachPointType> definedBindingTypes = new HashMap<QName, IntentAttachPointType>();
-        for (IntentAttachPointType bindingType : scaDefns.getBindingTypes()) {
-            definedBindingTypes.put(bindingType.getName(), bindingType);
-        }
-        
-        Map<QName, IntentAttachPointType> definedImplTypes = new HashMap<QName, IntentAttachPointType>();
-        for (IntentAttachPointType implType : scaDefns.getImplementationTypes()) {
-            definedImplTypes.put(implType.getName(), implType);
-        }
-        
         scaDefns.getIntents().clear();
-        scaDefns.getIntents().addAll(definedIntents.values());
+        scaDefns.getIntents().addAll(definedIntents);
         scaDefns.getPolicySets().clear();
-        scaDefns.getPolicySets().addAll(definedPolicySets.values());
+        scaDefns.getPolicySets().addAll(definedPolicySets);
         scaDefns.getBindingTypes().clear();
-        scaDefns.getBindingTypes().addAll(definedBindingTypes.values());
+        scaDefns.getBindingTypes().addAll(definedBindingTypes);
         scaDefns.getImplementationTypes().clear();
-        scaDefns.getImplementationTypes().addAll(definedImplTypes.values());
+        scaDefns.getImplementationTypes().addAll(definedImplTypes);
     }
 
     public void resolve(Definitions scaDefinitions, ModelResolver resolver) throws ContributionResolveException {
@@ -236,7 +223,7 @@
     }
 
     public String getArtifactType() {
-        return "definitions.xml";
+        return "META-INF/definitions.xml";
     }
 
     public Class<Definitions> getModelType() {

Modified: tuscany/java/sca/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsProcessor.java?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsProcessor.java (original)
+++ tuscany/java/sca/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsProcessor.java Fri Feb 20 20:10:37 2009
@@ -39,14 +39,13 @@
 import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
 import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
 import org.apache.tuscany.sca.core.FactoryExtensionPoint;
-import org.apache.tuscany.sca.definitions.DefinitionsFactory;
 import org.apache.tuscany.sca.definitions.Definitions;
+import org.apache.tuscany.sca.definitions.DefinitionsFactory;
 import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.policy.BindingType;
+import org.apache.tuscany.sca.policy.ImplementationType;
 import org.apache.tuscany.sca.policy.Intent;
-import org.apache.tuscany.sca.policy.IntentAttachPointType;
 import org.apache.tuscany.sca.policy.PolicySet;
-import org.apache.tuscany.sca.policy.ProfileIntent;
-import org.apache.tuscany.sca.policy.QualifiedIntent;
 
 /**
  * Processor for SCA Definitions
@@ -59,17 +58,17 @@
     private DefinitionsFactory definitionsFactory;
     private Monitor monitor;
 
+    public static final String SCA11_NS = "http://docs.oasis-open.org/ns/opencsa/sca/200712";
     public static final String BINDING = "binding";
     public static final String IMPLEMENTATION = "implementation";
-    public static final String SCA10_NS = "http://www.osoa.org/xmlns/sca/1.0";
-    public static final String SCA_DEFINITIONS = "definitions";
-    public static final QName SCA_DEFINITIONS_QNAME = new QName(SCA10_NS, SCA_DEFINITIONS);
+    public static final String DEFINITIONS = "definitions";
+    public static final QName DEFINITIONS_QNAME = new QName(SCA11_NS, DEFINITIONS);
     public static final String TARGET_NAMESPACE = "targetNamespace";
     public static final String NAME = "name";
 
     public DefinitionsProcessor(FactoryExtensionPoint factoryExtensionPoint,
-                                   StAXArtifactProcessor<Object> extensionProcessor,
-                                   Monitor monitor) {
+                                StAXArtifactProcessor<Object> extensionProcessor,
+                                Monitor monitor) {
         this.extensionProcessor = extensionProcessor;
         this.monitor = monitor;
         this.definitionsFactory = factoryExtensionPoint.getFactory(DefinitionsFactory.class);
@@ -85,7 +84,7 @@
             switch (event) {
                 case START_ELEMENT: {
                     name = reader.getName();
-                    if (SCA_DEFINITIONS_QNAME.equals(name)) {
+                    if (DEFINITIONS_QNAME.equals(name)) {
                         definitions = definitionsFactory.createDefinitions();
                         targetNamespace = reader.getAttributeValue(null, TARGET_NAMESPACE);
                         definitions.setTargetNamespace(targetNamespace);
@@ -95,17 +94,10 @@
                             if (extension instanceof Intent) {
                                 Intent intent = (Intent)extension;
                                 intent.setName(new QName(targetNamespace, intent.getName().getLocalPart()));
-                                if (intent instanceof QualifiedIntent) {
-                                    QualifiedIntent qualifiedIntent = (QualifiedIntent)intent;
-                                    qualifiedIntent.getQualifiableIntent()
-                                        .setName(new QName(targetNamespace, qualifiedIntent.getQualifiableIntent()
-                                            .getName().getLocalPart()));
-                                }
-
-                                // FIXME: Workaround for TUSCANY-2499
-                                intent.setUnresolved(false);
-
                                 definitions.getIntents().add(intent);
+                                for (Intent i : intent.getQualifiedIntents()) {
+                                    i.setName(new QName(targetNamespace, i.getName().getLocalPart()));
+                                }
                             } else if (extension instanceof PolicySet) {
                                 PolicySet policySet = (PolicySet)extension;
                                 policySet.setName(new QName(targetNamespace, policySet.getName().getLocalPart()));
@@ -113,13 +105,10 @@
                             } else if (extension instanceof Binding) {
                                 Binding binding = (Binding)extension;
                                 definitions.getBindings().add(binding);
-                            } else if (extension instanceof IntentAttachPointType) {
-                                IntentAttachPointType type = (IntentAttachPointType)extension;
-                                if (type.getName().getLocalPart().startsWith(BINDING)) {
-                                    definitions.getBindingTypes().add((IntentAttachPointType)extension);
-                                } else if (type.getName().getLocalPart().startsWith(IMPLEMENTATION)) {
-                                    definitions.getImplementationTypes().add((IntentAttachPointType)extension);
-                                }
+                            } else if (extension instanceof BindingType) {
+                                definitions.getBindingTypes().add((BindingType)extension);
+                            } else if (extension instanceof ImplementationType) {
+                                definitions.getImplementationTypes().add((ImplementationType)extension);
                             }
                         }
                         break;
@@ -131,7 +120,7 @@
 
                 case END_ELEMENT:
                     name = reader.getName();
-                    if (SCA_DEFINITIONS_QNAME.equals(name)) {
+                    if (DEFINITIONS_QNAME.equals(name)) {
                         return definitions;
                     }
                     break;
@@ -148,8 +137,7 @@
     public void write(Definitions definitions, XMLStreamWriter writer) throws ContributionWriteException,
         XMLStreamException {
 
-        writeStartDocument(writer, SCA10_NS, SCA_DEFINITIONS, new XAttr(TARGET_NAMESPACE, definitions
-            .getTargetNamespace()));
+        writeStartDocument(writer, SCA11_NS, DEFINITIONS, new XAttr(TARGET_NAMESPACE, definitions.getTargetNamespace()));
 
         for (Intent policyIntent : definitions.getIntents()) {
             extensionProcessor.write(policyIntent, writer);
@@ -159,11 +147,11 @@
             extensionProcessor.write(policySet, writer);
         }
 
-        for (IntentAttachPointType bindingType : definitions.getBindingTypes()) {
+        for (BindingType bindingType : definitions.getBindingTypes()) {
             extensionProcessor.write(bindingType, writer);
         }
 
-        for (IntentAttachPointType implType : definitions.getImplementationTypes()) {
+        for (ImplementationType implType : definitions.getImplementationTypes()) {
             extensionProcessor.write(implType, writer);
         }
 
@@ -175,71 +163,60 @@
         // are many cross artifact references in a definitions file and we don't want
         // to be dependent on the order things appear
 
-        List<Intent> simpleIntents = new ArrayList<Intent>();
-        List<ProfileIntent> profileIntents = new ArrayList<ProfileIntent>();
-        List<QualifiedIntent> qualifiedIntents = new ArrayList<QualifiedIntent>();
-        List<PolicySet> simplePolicySets = new ArrayList<PolicySet>();
+        List<Intent> intents = new ArrayList<Intent>();
+        List<PolicySet> policySets = new ArrayList<PolicySet>();
         List<PolicySet> referredPolicySets = new ArrayList<PolicySet>();
 
-        for (Intent policyIntent : scaDefns.getIntents()) {
-            if (policyIntent instanceof ProfileIntent)
-                profileIntents.add((ProfileIntent)policyIntent);
-            else if (policyIntent instanceof QualifiedIntent)
-                qualifiedIntents.add((QualifiedIntent)policyIntent);
-            else
-                simpleIntents.add(policyIntent);
-
-            resolver.addModel(policyIntent);
+        for (Intent intent : scaDefns.getIntents()) {
+            intents.add(intent);
+            resolver.addModel(intent);
+            for (Intent i : intent.getQualifiedIntents()) {
+                intents.add(i);
+                resolver.addModel(i);
+            }
         }
 
         for (PolicySet policySet : scaDefns.getPolicySets()) {
-            if (policySet.getReferencedPolicySets().isEmpty())
-                simplePolicySets.add(policySet);
-            else
+            if (policySet.getReferencedPolicySets().isEmpty()) {
+                policySets.add(policySet);
+            } else {
                 referredPolicySets.add(policySet);
+            }
 
             resolver.addModel(policySet);
         }
 
-        for (IntentAttachPointType bindingType : scaDefns.getBindingTypes()) {
+        for (BindingType bindingType : scaDefns.getBindingTypes()) {
             resolver.addModel(bindingType);
         }
 
-        for (IntentAttachPointType implType : scaDefns.getImplementationTypes()) {
+        for (ImplementationType implType : scaDefns.getImplementationTypes()) {
             resolver.addModel(implType);
         }
 
         // now resolve everything to ensure that any references between
         // artifacts are satisfied
 
-        for (Intent policyIntent : simpleIntents)
-            extensionProcessor.resolve(policyIntent, resolver);
-
-        for (ProfileIntent policyIntent : profileIntents)
-            extensionProcessor.resolve(policyIntent, resolver);
-
-        for (QualifiedIntent policyIntent : qualifiedIntents)
+        for (Intent policyIntent : intents)
             extensionProcessor.resolve(policyIntent, resolver);
 
-        for (PolicySet policySet : simplePolicySets)
+        for (PolicySet policySet : policySets)
             extensionProcessor.resolve(policySet, resolver);
 
         for (PolicySet policySet : referredPolicySets)
             extensionProcessor.resolve(policySet, resolver);
 
-        for (int count = 0, size = scaDefns.getBindingTypes().size(); count < size; count++) {
-            IntentAttachPointType bindingType = scaDefns.getBindingTypes().get(count);
+        for (BindingType bindingType : scaDefns.getBindingTypes()) {
             extensionProcessor.resolve(bindingType, resolver);
         }
 
-        for (int count = 0, size = scaDefns.getImplementationTypes().size(); count < size; count++) {
-            IntentAttachPointType implType = scaDefns.getImplementationTypes().get(count);
-            extensionProcessor.resolve(implType, resolver);
+        for (ImplementationType implementationType : scaDefns.getImplementationTypes()) {
+            extensionProcessor.resolve(implementationType, resolver);
         }
     }
 
     public QName getArtifactType() {
-        return SCA_DEFINITIONS_QNAME;
+        return DEFINITIONS_QNAME;
     }
 
     public Class<Definitions> getModelType() {

Modified: tuscany/java/sca/modules/definitions-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/definitions-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/definitions-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor (original)
+++ tuscany/java/sca/modules/definitions-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor Fri Feb 20 20:10:37 2009
@@ -16,4 +16,4 @@
 # under the License. 
 
 # Implementation class for the artifact processor extension
-org.apache.tuscany.sca.definitions.xml.DefinitionsProcessor;qname=http://www.osoa.org/xmlns/sca/1.0#definitions,model=org.apache.tuscany.sca.definitions.Definitions
+org.apache.tuscany.sca.definitions.xml.DefinitionsProcessor;qname=http://docs.oasis-open.org/ns/opencsa/sca/200712#definitions,model=org.apache.tuscany.sca.definitions.Definitions

Modified: tuscany/java/sca/modules/definitions-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/definitions-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor?rev=746356&r1=746355&r2=746356&view=diff
==============================================================================
--- tuscany/java/sca/modules/definitions-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor (original)
+++ tuscany/java/sca/modules/definitions-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor Fri Feb 20 20:10:37 2009
@@ -16,4 +16,4 @@
 # under the License. 
 
 # Implementation class for the artifact processor extension
-org.apache.tuscany.sca.definitions.xml.DefinitionsDocumentProcessor;type=definitions.xml,model=org.apache.tuscany.sca.definitions.Definitions
+org.apache.tuscany.sca.definitions.xml.DefinitionsDocumentProcessor;type=META-INF/definitions.xml,model=org.apache.tuscany.sca.definitions.Definitions



Mime
View raw message