tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svkr...@apache.org
Subject svn commit: r643489 - in /incubator/tuscany/java/sca/modules: assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ assembly/ assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ binding-sca/src/main/java/org/apache/tuscany/sc...
Date Tue, 01 Apr 2008 18:07:26 GMT
Author: svkrish
Date: Tue Apr  1 11:06:42 2008
New Revision: 643489

URL: http://svn.apache.org/viewvc?rev=643489&view=rev
Log:
moving out bindingType resolution to BaseAssemblyProcessor, moving SCADefinitionsProvider to core-spi module, fixing http://issues.apache.org/jira/browse/TUSCANY-2171

Added:
    incubator/tuscany/java/sca/modules/binding-sca/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider
      - copied unchanged from r643304, incubator/tuscany/java/sca/modules/binding-sca/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.SCADefinitionsProvider
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider
      - copied unchanged from r643304, incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.SCADefinitionsProvider
    incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultSCADefinitionsProviderExtensionPoint.java   (with props)
    incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProvider.java   (with props)
    incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProviderException.java   (with props)
    incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProviderExtensionPoint.java   (with props)
    incubator/tuscany/java/sca/modules/core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProviderExtensionPoint
    incubator/tuscany/java/sca/modules/policy-logging/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider
      - copied unchanged from r643304, incubator/tuscany/java/sca/modules/policy-logging/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.SCADefinitionsProvider
    incubator/tuscany/java/sca/modules/policy-security/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider
      - copied unchanged from r643304, incubator/tuscany/java/sca/modules/policy-security/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.SCADefinitionsProvider
    incubator/tuscany/java/sca/modules/policy-security/src/main/resources/org/apache/tuscany/sca/policy/security/tuscany_definitions.xml   (with props)
    incubator/tuscany/java/sca/modules/policy-transaction/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider
      - copied unchanged from r643304, incubator/tuscany/java/sca/modules/policy-transaction/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.SCADefinitionsProvider
Removed:
    incubator/tuscany/java/sca/modules/binding-sca/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.SCADefinitionsProvider
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.SCADefinitionsProvider
    incubator/tuscany/java/sca/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/SCADefinitionsProvider.java
    incubator/tuscany/java/sca/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/SCADefinitionsProviderException.java
    incubator/tuscany/java/sca/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/SCADefinitionsProviderExtensionPoint.java
    incubator/tuscany/java/sca/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/impl/DefaultSCADefinitionsProviderExtensionPoint.java
    incubator/tuscany/java/sca/modules/definitions/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.SCADefinitionsProviderExtensionPoint
    incubator/tuscany/java/sca/modules/policy-logging/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.SCADefinitionsProvider
    incubator/tuscany/java/sca/modules/policy-security/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.SCADefinitionsProvider
    incubator/tuscany/java/sca/modules/policy-transaction/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.SCADefinitionsProvider
Modified:
    incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java
    incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java
    incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/PolicyAttachPointProcessor.java
    incubator/tuscany/java/sca/modules/assembly/pom.xml
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeConfigurationBuilderImpl.java
    incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingDefinitionsProvider.java
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/WSBindingDefinitionsProvider.java
    incubator/tuscany/java/sca/modules/core-spi/pom.xml
    incubator/tuscany/java/sca/modules/definitions/pom.xml
    incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntime.java
    incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java
    incubator/tuscany/java/sca/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/LoggingPolicyDefinitionsProvider.java
    incubator/tuscany/java/sca/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/SecurityPolicyDefinitionsProvider.java
    incubator/tuscany/java/sca/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/TransactionPolicyDefinitionsProvider.java

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java?rev=643489&r1=643488&r2=643489&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java Tue Apr  1 11:06:42 2008
@@ -363,6 +363,14 @@
                     
                     if (binding instanceof IntentAttachPoint) {
                         IntentAttachPoint policiedBinding = (IntentAttachPoint)binding;
+                        
+                        if ( policiedBinding.getType().isUnresolved() ) {
+                            IntentAttachPointType resolved = 
+                                resolver.resolveModel(IntentAttachPointType.class, 
+                                                      policiedBinding.getType());
+                            policiedBinding.setType(resolved);
+                        }
+                        
                         resolveIntents(policiedBinding.getRequiredIntents(), resolver);
                         PolicyValidationUtils.validateIntents(policiedBinding, policiedBinding.getType());
                     }
@@ -416,6 +424,14 @@
     
                         if (binding instanceof IntentAttachPoint) {
                             IntentAttachPoint policiedBinding = (IntentAttachPoint)binding;
+                            
+                            if ( policiedBinding.getType().isUnresolved() ) {
+                                IntentAttachPointType resolved = 
+                                    resolver.resolveModel(IntentAttachPointType.class, 
+                                                          policiedBinding.getType());
+                                policiedBinding.setType(resolved);
+                            }
+                            
                             resolveIntents(policiedBinding.getRequiredIntents(), resolver);
                             PolicyValidationUtils.validateIntents(policiedBinding, policiedBinding.getType());
                         }

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java?rev=643489&r1=643488&r2=643489&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java Tue Apr  1 11:06:42 2008
@@ -54,6 +54,7 @@
     private XMLInputFactory inputFactory;
     private List scaDefnSink;
     private Collection<PolicySet> domainPolicySets = null;
+    private int scaDefnsCount = 0;
 
     /**
      * Construct a new composite processor
@@ -148,7 +149,8 @@
     
     private void fillDomainPolicySets(List scaDefnsSink) {
         Map<QName, PolicySet> domainPolicySetMap = null;
-        if ( !scaDefnsSink.isEmpty() ) {
+        if ( scaDefnsSink.size() > scaDefnsCount ) {
+        //if ( !scaDefnsSink.isEmpty() ) {
             domainPolicySetMap = new Hashtable<QName, PolicySet>();
             
             if ( domainPolicySets != null ) {
@@ -165,7 +167,8 @@
                 }
             }
             domainPolicySets =  domainPolicySetMap.values();
-            scaDefnsSink.clear();
+            //scaDefnsSink.clear();
+            scaDefnsCount = scaDefnsSink.size();
         }
     }
 }

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/PolicyAttachPointProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/PolicyAttachPointProcessor.java?rev=643489&r1=643488&r2=643489&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/PolicyAttachPointProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/PolicyAttachPointProcessor.java Tue Apr  1 11:06:42 2008
@@ -239,14 +239,6 @@
             List<Intent> requiredIntents = new ArrayList<Intent>();
             Intent resolvedIntent = null;
             
-            if ( policySetAttachPoint instanceof Binding ) {
-                if ( policySetAttachPoint.getType().isUnresolved() ) {
-                    IntentAttachPointType resolved = 
-                        resolver.resolveModel(IntentAttachPointType.class, policySetAttachPoint.getType());
-                    policySetAttachPoint.setType(resolved);
-                }
-            }
-            
             if ( policySetAttachPoint.getRequiredIntents() != null && policySetAttachPoint.getRequiredIntents().size() > 0 ) {
                 for ( Intent intent : policySetAttachPoint.getRequiredIntents() ) {
                     resolvedIntent = resolver.resolveModel(Intent.class, intent);

Modified: incubator/tuscany/java/sca/modules/assembly/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/pom.xml?rev=643489&r1=643488&r2=643489&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/pom.xml (original)
+++ incubator/tuscany/java/sca/modules/assembly/pom.xml Tue Apr  1 11:06:42 2008
@@ -40,5 +40,11 @@
             <artifactId>tuscany-interface</artifactId>
             <version>2.0-incubating-SNAPSHOT</version>
         </dependency>
+
+	<dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-definitions</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+        </dependency>
     </dependencies>
 </project>

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderImpl.java?rev=643489&r1=643488&r2=643489&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderImpl.java Tue Apr  1 11:06:42 2008
@@ -29,6 +29,7 @@
 import org.apache.tuscany.sca.assembly.builder.CompositeBuilderMonitor;
 import org.apache.tuscany.sca.assembly.builder.Problem;
 import org.apache.tuscany.sca.assembly.builder.Problem.Severity;
+import org.apache.tuscany.sca.definitions.SCADefinitions;
 import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
 import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
 
@@ -80,6 +81,17 @@
         wireBuilder = new CompositeWireBuilderImpl(assemblyFactory, interfaceContractMapper, monitor);
         cloneBuilder = new CompositeCloneBuilderImpl(monitor);
         configurationBuilder = new CompositeConfigurationBuilderImpl(assemblyFactory, scaBindingFactory, intentAttachPointTypeFactory, interfaceContractMapper, monitor);
+        
+    }
+    
+    public CompositeBuilderImpl(AssemblyFactory assemblyFactory,
+                                SCABindingFactory scaBindingFactory,
+                                IntentAttachPointTypeFactory  intentAttachPointTypeFactory,
+                                InterfaceContractMapper interfaceContractMapper,
+                                CompositeBuilderMonitor monitor, 
+                                SCADefinitions scaDefns) {
+        this(assemblyFactory, scaBindingFactory, intentAttachPointTypeFactory, interfaceContractMapper, monitor);
+        configurationBuilder.setScaDefinitions(scaDefns);
     }
 
     public void build(Composite composite) throws CompositeBuilderException {

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeConfigurationBuilderImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeConfigurationBuilderImpl.java?rev=643489&r1=643488&r2=643489&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeConfigurationBuilderImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeConfigurationBuilderImpl.java Tue Apr  1 11:06:42 2008
@@ -45,8 +45,10 @@
 import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
 import org.apache.tuscany.sca.assembly.builder.CompositeBuilderMonitor;
 import org.apache.tuscany.sca.assembly.builder.Problem.Severity;
+import org.apache.tuscany.sca.definitions.SCADefinitions;
 import org.apache.tuscany.sca.interfacedef.InterfaceContract;
 import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
+import org.apache.tuscany.sca.policy.IntentAttachPoint;
 import org.apache.tuscany.sca.policy.IntentAttachPointType;
 import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
 import org.apache.tuscany.sca.policy.PolicySetAttachPoint;
@@ -61,7 +63,7 @@
     private CompositeBuilderMonitor monitor;
     private InterfaceContractMapper interfaceContractMapper;
     private IntentAttachPointTypeFactory  intentAttachPointTypeFactory;
-    
+    private SCADefinitions scaDefinitions = null;
 
     public CompositeConfigurationBuilderImpl(AssemblyFactory assemblyFactory,
                                              SCABindingFactory scaBindingFactory,
@@ -1038,10 +1040,14 @@
     
     private SCABinding createSCABinding() {
         SCABinding scaBinding = scaBindingFactory.createSCABinding();
-        IntentAttachPointType bindingType = intentAttachPointTypeFactory.createBindingType();
-        bindingType.setName(BINDING_SCA_QNAME);
-        bindingType.setUnresolved(true);
-        ((PolicySetAttachPoint)scaBinding).setType(bindingType);
+        
+        if ( scaDefinitions != null ) {
+            for ( IntentAttachPointType attachPointType : scaDefinitions.getBindingTypes() ) {
+                if ( attachPointType.getName().equals(BINDING_SCA_QNAME)) {
+                    ((IntentAttachPoint)scaBinding).setType(attachPointType);
+                }
+            }
+        }
         
         return scaBinding;
     }
@@ -1399,5 +1405,13 @@
             uri = URI.create("/").resolve(uri);
         }
         return uri.toString();
+    }
+
+    public SCADefinitions getScaDefinitions() {
+        return scaDefinitions;
+    }
+
+    public void setScaDefinitions(SCADefinitions scaDefinitions) {
+        this.scaDefinitions = scaDefinitions;
     }    
 }

Modified: incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingDefinitionsProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingDefinitionsProvider.java?rev=643489&r1=643488&r2=643489&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingDefinitionsProvider.java (original)
+++ incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingDefinitionsProvider.java Tue Apr  1 11:06:42 2008
@@ -28,8 +28,8 @@
 import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint;
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.definitions.SCADefinitions;
-import org.apache.tuscany.sca.definitions.SCADefinitionsProvider;
-import org.apache.tuscany.sca.definitions.SCADefinitionsProviderException;
+import org.apache.tuscany.sca.provider.SCADefinitionsProvider;
+import org.apache.tuscany.sca.provider.SCADefinitionsProviderException;
 
 /**
  * Provider for Policy Intents and PolicySet definitions related to security

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/WSBindingDefinitionsProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/WSBindingDefinitionsProvider.java?rev=643489&r1=643488&r2=643489&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/WSBindingDefinitionsProvider.java (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/WSBindingDefinitionsProvider.java Tue Apr  1 11:06:42 2008
@@ -26,8 +26,8 @@
 import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint;
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.definitions.SCADefinitions;
-import org.apache.tuscany.sca.definitions.SCADefinitionsProvider;
-import org.apache.tuscany.sca.definitions.SCADefinitionsProviderException;
+import org.apache.tuscany.sca.provider.SCADefinitionsProvider;
+import org.apache.tuscany.sca.provider.SCADefinitionsProviderException;
 
 /**
  * Provider for Policy Intents and PolicySet definitions related to security

Modified: incubator/tuscany/java/sca/modules/core-spi/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spi/pom.xml?rev=643489&r1=643488&r2=643489&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spi/pom.xml (original)
+++ incubator/tuscany/java/sca/modules/core-spi/pom.xml Tue Apr  1 11:06:42 2008
@@ -46,6 +46,12 @@
             <artifactId>tuscany-assembly</artifactId>
             <version>2.0-incubating-SNAPSHOT</version>
         </dependency>
+        
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-definitions</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+        </dependency>
 
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>

Added: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultSCADefinitionsProviderExtensionPoint.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultSCADefinitionsProviderExtensionPoint.java?rev=643489&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultSCADefinitionsProviderExtensionPoint.java (added)
+++ incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultSCADefinitionsProviderExtensionPoint.java Tue Apr  1 11:06:42 2008
@@ -0,0 +1,89 @@
+/*
+ * 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.    
+ */
+
+package org.apache.tuscany.sca.provider;
+
+import java.lang.reflect.Constructor;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.extensibility.ServiceDeclaration;
+import org.apache.tuscany.sca.extensibility.ServiceDiscovery;
+
+/**
+ * Concrete Implementation for the SCADefinitionsProviderExtensionPoint
+ */
+public class DefaultSCADefinitionsProviderExtensionPoint implements
+    SCADefinitionsProviderExtensionPoint {
+
+    private ExtensionPointRegistry extensionPointRegistry = null;
+    
+    private List<SCADefinitionsProvider> scaDefnsProviders = new ArrayList<SCADefinitionsProvider>();
+    
+    public DefaultSCADefinitionsProviderExtensionPoint(ExtensionPointRegistry extnPtReg) {
+        this.extensionPointRegistry = extnPtReg;
+    }
+
+    public void addSCADefinitionsProvider(SCADefinitionsProvider provider) {
+        scaDefnsProviders.add(provider);
+    }
+
+    public void removeSCADefinitionsProvider(SCADefinitionsProvider provider) {
+        scaDefnsProviders.remove(provider);
+    }
+
+    public List<SCADefinitionsProvider> getSCADefinitionsProviders() {
+        if (scaDefnsProviders.isEmpty()) {
+            loadProviders();
+        }
+        return scaDefnsProviders;
+    }
+
+    private void loadProviders() {
+        // Get the provider service declarations
+        Set<ServiceDeclaration> defnProviderDecls;
+        SCADefinitionsProvider aProvider = null;
+        Class providerClass = null;
+        Constructor constructor = null;
+
+        try {
+            defnProviderDecls =
+                ServiceDiscovery.getInstance().getServiceDeclarations(SCADefinitionsProvider.class);
+    
+            for (ServiceDeclaration aDefnProviderDecl : defnProviderDecls) {
+                providerClass = aDefnProviderDecl.loadClass();
+            
+                try {
+                    constructor = providerClass.getConstructor();
+                    aProvider = (SCADefinitionsProvider)constructor.newInstance();
+                } catch (NoSuchMethodException e1) {
+                        constructor = providerClass.getConstructor(ExtensionPointRegistry.class);
+                        aProvider = (SCADefinitionsProvider)constructor.newInstance(extensionPointRegistry);
+                } 
+                
+                scaDefnsProviders.add(aProvider);
+            }
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+
+    }
+}

Propchange: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultSCADefinitionsProviderExtensionPoint.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultSCADefinitionsProviderExtensionPoint.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProvider.java?rev=643489&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProvider.java (added)
+++ incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProvider.java Tue Apr  1 11:06:42 2008
@@ -0,0 +1,31 @@
+/*
+ * 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.    
+ */
+
+package org.apache.tuscany.sca.provider;
+
+import org.apache.tuscany.sca.definitions.SCADefinitions;
+
+/**
+ * Models a provider of SCA Definitions.  Typically SCA Definitions providers 
+ * may either load a definitions.xml file or create the SCA Definitions model
+ * programmatically.
+ */
+public interface SCADefinitionsProvider {
+    SCADefinitions getSCADefinition() throws SCADefinitionsProviderException ;
+}

Propchange: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProvider.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProviderException.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProviderException.java?rev=643489&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProviderException.java (added)
+++ incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProviderException.java Tue Apr  1 11:06:42 2008
@@ -0,0 +1,30 @@
+/*
+ * 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.    
+ */
+
+package org.apache.tuscany.sca.provider;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class SCADefinitionsProviderException extends Exception {
+   
+    public SCADefinitionsProviderException(Throwable e) {
+        super(e);
+    }
+}

Propchange: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProviderException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProviderException.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProviderExtensionPoint.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProviderExtensionPoint.java?rev=643489&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProviderExtensionPoint.java (added)
+++ incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProviderExtensionPoint.java Tue Apr  1 11:06:42 2008
@@ -0,0 +1,33 @@
+/*
+ * 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.    
+ */
+
+package org.apache.tuscany.sca.provider;
+
+import java.util.List;
+
+/**
+ * An extension point for SCA Definitions Providers.  SCA Definition providers, load SCA Definitions
+ * items that are being specifically contributed by the module that hosts the provider in question.
+ */
+public interface SCADefinitionsProviderExtensionPoint {
+    
+    void addSCADefinitionsProvider(SCADefinitionsProvider provider);
+    void removeSCADefinitionsProvider(SCADefinitionsProvider provider);
+    List<SCADefinitionsProvider> getSCADefinitionsProviders();
+}

Propchange: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProviderExtensionPoint.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProviderExtensionPoint.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProviderExtensionPoint
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProviderExtensionPoint?rev=643489&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProviderExtensionPoint (added)
+++ incubator/tuscany/java/sca/modules/core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProviderExtensionPoint Tue Apr  1 11:06:42 2008
@@ -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. 
+
+org.apache.tuscany.sca.provider.DefaultSCADefinitionsProviderExtensionPoint
+										
\ No newline at end of file

Modified: incubator/tuscany/java/sca/modules/definitions/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/definitions/pom.xml?rev=643489&r1=643488&r2=643489&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/definitions/pom.xml (original)
+++ incubator/tuscany/java/sca/modules/definitions/pom.xml Tue Apr  1 11:06:42 2008
@@ -41,12 +41,6 @@
             <version>2.0-incubating-SNAPSHOT</version>
         </dependency>
 
-	<dependency>
-            <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-core-spi</artifactId>
-            <version>2.0-incubating-SNAPSHOT</version>
-        </dependency>
-        
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
             <artifactId>tuscany-assembly-xsd</artifactId>

Modified: incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntime.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntime.java?rev=643489&r1=643488&r2=643489&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntime.java (original)
+++ incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntime.java Tue Apr  1 11:06:42 2008
@@ -49,8 +49,6 @@
 import org.apache.tuscany.sca.core.invocation.ProxyFactory;
 import org.apache.tuscany.sca.core.scope.ScopeRegistry;
 import org.apache.tuscany.sca.definitions.SCADefinitions;
-import org.apache.tuscany.sca.definitions.SCADefinitionsProvider;
-import org.apache.tuscany.sca.definitions.SCADefinitionsProviderExtensionPoint;
 import org.apache.tuscany.sca.definitions.impl.SCADefinitionsImpl;
 import org.apache.tuscany.sca.definitions.util.SCADefinitionsUtil;
 import org.apache.tuscany.sca.definitions.xml.SCADefinitionsDocumentProcessor;
@@ -66,6 +64,8 @@
 import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
 import org.apache.tuscany.sca.policy.PolicyFactory;
 import org.apache.tuscany.sca.policy.PolicySet;
+import org.apache.tuscany.sca.provider.SCADefinitionsProvider;
+import org.apache.tuscany.sca.provider.SCADefinitionsProviderExtensionPoint;
 import org.apache.tuscany.sca.work.WorkScheduler;
 
 public class ReallySmallRuntime {
@@ -194,10 +194,15 @@
         InterfaceContractMapper mapper = new InterfaceContractMapperImpl();
         
         //Create a composite builder
+        SCADefinitions scaDefns = new SCADefinitionsImpl();
+        for ( SCADefinitions aDef : ((List<SCADefinitions>)scaDefnsSink) ) {
+            SCADefinitionsUtil.aggregateSCADefinitions(aDef, scaDefns);
+        }
         compositeBuilder = ReallySmallRuntimeBuilder.createCompositeBuilder(assemblyFactory,
                                                                             scaBindingFactory,
                                                                             intentAttachPointTypeFactory,
-                                                                            mapper);
+                                                                            mapper, 
+                                                                            scaDefns);
         compositeBuilder.build(composite);
         
     }
@@ -247,6 +252,7 @@
                SCADefinitionsUtil.aggregateSCADefinitions(aSCADefn, systemSCADefinitions);
             }
             
+            scaDefnsSink.add(systemSCADefinitions);
             //we cannot expect that providers will add the intents and policysets into the resolver
             //so we do this here explicitly
             for ( Intent intent : systemSCADefinitions.getPolicyIntents() ) {
@@ -271,31 +277,6 @@
         } catch ( Exception e ) {
             throw new ActivationException(e);
         }
-        
-        /*URLArtifactProcessorExtensionPoint documentProcessors = registry.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
-        SCADefinitionsDocumentProcessor definitionsProcessor = (SCADefinitionsDocumentProcessor)documentProcessors.getProcessor(SCADefinitions.class);
-        
-        try {
-            Map<ClassLoader, Set<URL>> scaDefinitionFiles = 
-            ServiceDiscovery.getInstance().getServiceResources("definitions.xml");
-            
-            SCADefinitions systemSCADefinitions = new SCADefinitionsImpl();
-            for ( ClassLoader cl : scaDefinitionFiles.keySet() ) {
-                for ( URL scaDefnUrl : scaDefinitionFiles.get(cl) ) {
-                    SCADefinitions defnSubset = definitionsProcessor.read(null, null, scaDefnUrl);
-                    SCADefinitionsUtil.aggregateSCADefinitions(defnSubset, systemSCADefinitions);
-                }
-            }
-            
-            definitionsProcessor.resolve(systemSCADefinitions, definitionsProcessor.getSCADefinitionsResolver());
-            scaDefnsSink.add(systemSCADefinitions);
-        } catch ( ContributionReadException e ) {
-            throw new ActivationException(e);
-        } catch ( ContributionResolveException e ) {
-            throw new ActivationException(e);
-        } catch ( IOException e ) {
-            throw new ActivationException(e);
-        }*/
     }
     
     @SuppressWarnings("unchecked")

Modified: incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java?rev=643489&r1=643488&r2=643489&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java (original)
+++ incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java Tue Apr  1 11:06:42 2008
@@ -80,6 +80,7 @@
 import org.apache.tuscany.sca.core.scope.ScopeRegistry;
 import org.apache.tuscany.sca.core.scope.ScopeRegistryImpl;
 import org.apache.tuscany.sca.core.scope.StatelessScopeContainerFactory;
+import org.apache.tuscany.sca.definitions.SCADefinitions;
 import org.apache.tuscany.sca.definitions.xml.SCADefinitionsDocumentProcessor;
 import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
 import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory;
@@ -148,8 +149,14 @@
     public static CompositeBuilder createCompositeBuilder(AssemblyFactory assemblyFactory,
                                                           SCABindingFactory scaBindingFactory,
                                                           IntentAttachPointTypeFactory intentAttachPointTypeFactory,
-                                                          InterfaceContractMapper interfaceContractMapper) {
-        return new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, intentAttachPointTypeFactory, interfaceContractMapper, null);
+                                                          InterfaceContractMapper interfaceContractMapper,
+                                                          SCADefinitions scaDefns) {
+        return new CompositeBuilderImpl(assemblyFactory, 
+                                        scaBindingFactory, 
+                                        intentAttachPointTypeFactory, 
+                                        interfaceContractMapper, 
+                                        null,
+                                        scaDefns);
     }
     
     public static DomainBuilder createDomainBuilder(AssemblyFactory assemblyFactory,

Modified: incubator/tuscany/java/sca/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/LoggingPolicyDefinitionsProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/LoggingPolicyDefinitionsProvider.java?rev=643489&r1=643488&r2=643489&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/LoggingPolicyDefinitionsProvider.java (original)
+++ incubator/tuscany/java/sca/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/LoggingPolicyDefinitionsProvider.java Tue Apr  1 11:06:42 2008
@@ -28,8 +28,8 @@
 import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint;
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.definitions.SCADefinitions;
-import org.apache.tuscany.sca.definitions.SCADefinitionsProvider;
-import org.apache.tuscany.sca.definitions.SCADefinitionsProviderException;
+import org.apache.tuscany.sca.provider.SCADefinitionsProvider;
+import org.apache.tuscany.sca.provider.SCADefinitionsProviderException;
 
 /**
  * Provider for Policy Intents and PolicySet definitions related to security

Modified: incubator/tuscany/java/sca/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/SecurityPolicyDefinitionsProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/SecurityPolicyDefinitionsProvider.java?rev=643489&r1=643488&r2=643489&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/SecurityPolicyDefinitionsProvider.java (original)
+++ incubator/tuscany/java/sca/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/SecurityPolicyDefinitionsProvider.java Tue Apr  1 11:06:42 2008
@@ -28,13 +28,15 @@
 import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint;
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.definitions.SCADefinitions;
-import org.apache.tuscany.sca.definitions.SCADefinitionsProvider;
-import org.apache.tuscany.sca.definitions.SCADefinitionsProviderException;
+import org.apache.tuscany.sca.definitions.util.SCADefinitionsUtil;
+import org.apache.tuscany.sca.provider.SCADefinitionsProvider;
+import org.apache.tuscany.sca.provider.SCADefinitionsProviderException;
 
 /**
  * Provider for Policy Intents and PolicySet definitions related to security
  */
 public class SecurityPolicyDefinitionsProvider implements SCADefinitionsProvider {
+    private final static String tuscanyDefinitionsFile = "org/apache/tuscany/sca/policy/security/tuscany_definitions.xml";
     private String definitionsFile = "org/apache/tuscany/sca/policy/security/definitions.xml";
     URLArtifactProcessor urlArtifactProcessor = null;
     
@@ -44,19 +46,35 @@
     }
 
     public SCADefinitions getSCADefinition() throws SCADefinitionsProviderException {
-        // Allow privileged access to load resource. Requires RuntimePermssion in security policy.
-        URL definitionsFileUrl = AccessController.doPrivileged(new PrivilegedAction<URL>() {
-            public URL run() {
-                return getClass().getClassLoader().getResource(definitionsFile);
-            }
-        });           
-        
-        Object scaDefn = null;
+        SCADefinitions scaDefns = null;
+        SCADefinitions tuscanyDefns = null;
         try {
+            // Allow privileged access to load resource. Requires RuntimePermssion in security policy.
+            URL definitionsFileUrl = AccessController.doPrivileged(new PrivilegedAction<URL>() {
+                public URL run() {
+                    return getClass().getClassLoader().getResource(definitionsFile);
+                }
+            });           
+        
             URI uri = new URI(definitionsFile);
-            return (SCADefinitions)urlArtifactProcessor.read(null, 
+            scaDefns = (SCADefinitions)urlArtifactProcessor.read(null, 
+                                                             uri, 
+                                                             definitionsFileUrl);
+            
+            definitionsFileUrl = AccessController.doPrivileged(new PrivilegedAction<URL>() {
+                public URL run() {
+                    return getClass().getClassLoader().getResource(tuscanyDefinitionsFile);
+                }
+            }); 
+            
+            uri = new URI(definitionsFile);
+            tuscanyDefns = (SCADefinitions)urlArtifactProcessor.read(null, 
                                                              uri, 
                                                              definitionsFileUrl);
+            
+            SCADefinitionsUtil.aggregateSCADefinitions(tuscanyDefns, scaDefns);
+            return scaDefns;
+            
         } catch ( Exception e ) {
             throw new SCADefinitionsProviderException(e);
         }

Added: incubator/tuscany/java/sca/modules/policy-security/src/main/resources/org/apache/tuscany/sca/policy/security/tuscany_definitions.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-security/src/main/resources/org/apache/tuscany/sca/policy/security/tuscany_definitions.xml?rev=643489&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-security/src/main/resources/org/apache/tuscany/sca/policy/security/tuscany_definitions.xml (added)
+++ incubator/tuscany/java/sca/modules/policy-security/src/main/resources/org/apache/tuscany/sca/policy/security/tuscany_definitions.xml Tue Apr  1 11:06:42 2008
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+    * 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.    
+-->
+<definitions xmlns="http://www.osoa.org/xmlns/sca/1.0" targetNamespace="http://tuscany.apache.org/xmlns/sca/1.0"
+    xmlns:sca="http://www.osoa.org/xmlns/sca/1.0" xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0">
+
+    <intent name="jaasAuthentication" constrains="sca:implementation.java">
+        <description>All invocations to be authenticated</description>
+    </intent>
+</definitions>
\ No newline at end of file

Propchange: incubator/tuscany/java/sca/modules/policy-security/src/main/resources/org/apache/tuscany/sca/policy/security/tuscany_definitions.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/policy-security/src/main/resources/org/apache/tuscany/sca/policy/security/tuscany_definitions.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/modules/policy-security/src/main/resources/org/apache/tuscany/sca/policy/security/tuscany_definitions.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/tuscany/java/sca/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/TransactionPolicyDefinitionsProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/TransactionPolicyDefinitionsProvider.java?rev=643489&r1=643488&r2=643489&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/TransactionPolicyDefinitionsProvider.java (original)
+++ incubator/tuscany/java/sca/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/TransactionPolicyDefinitionsProvider.java Tue Apr  1 11:06:42 2008
@@ -26,9 +26,9 @@
 import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint;
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.definitions.SCADefinitions;
-import org.apache.tuscany.sca.definitions.SCADefinitionsProvider;
-import org.apache.tuscany.sca.definitions.SCADefinitionsProviderException;
 import org.apache.tuscany.sca.definitions.util.SCADefinitionsUtil;
+import org.apache.tuscany.sca.provider.SCADefinitionsProvider;
+import org.apache.tuscany.sca.provider.SCADefinitionsProviderException;
 
 /**
  * Provider for Policy Intents and PolicySet definitions related to transaction



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


Mime
View raw message