You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by bd...@apache.org on 2010/08/05 05:01:09 UTC
svn commit: r982458 - in /tuscany:
otest/newlayout/tuscany-test-runner/src/test/resources/tuscany-oasis-sca-tests-errors.properties
sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java
Author: bdaniel
Date: Thu Aug 5 03:01:09 2010
New Revision: 982458
URL: http://svn.apache.org/viewvc?rev=982458&view=rev
Log:
TUSCANY-3642 Allow policy information on interfaces to apply to services and bindings, even if it is mutually exclusive with policy information on those elements.
Modified:
tuscany/otest/newlayout/tuscany-test-runner/src/test/resources/tuscany-oasis-sca-tests-errors.properties
tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java
Modified: tuscany/otest/newlayout/tuscany-test-runner/src/test/resources/tuscany-oasis-sca-tests-errors.properties
URL: http://svn.apache.org/viewvc/tuscany/otest/newlayout/tuscany-test-runner/src/test/resources/tuscany-oasis-sca-tests-errors.properties?rev=982458&r1=982457&r2=982458&view=diff
==============================================================================
--- tuscany/otest/newlayout/tuscany-test-runner/src/test/resources/tuscany-oasis-sca-tests-errors.properties (original)
+++ tuscany/otest/newlayout/tuscany-test-runner/src/test/resources/tuscany-oasis-sca-tests-errors.properties Thu Aug 5 03:01:09 2010
@@ -72,6 +72,7 @@ ASM_8009=org.oasisopen.sca.ServiceRuntim
ASM_8010=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_8010Component2, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite63] - Interface of composite service Service1 must be subset of the interface declared by promoted component service. Callback operation not found on target
ASM_8011=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite62] - [ASM60008,ASM60013] Interface of composite reference Reference1 must be compatible with the interface declared by promoted component reference. Callback operation not found on target
ASM_8012=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_8012Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite64] - [ASM60008,ASM60013] Interface of composite reference Reference1 must be compatible with the interface declared by promoted component reference.
+ASM_8014=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent2, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}Joe and {http://docs.oasis-open.org/ns/opencsa/sca/200912}confidentiality.transport are mutually exclusive
ASM_8017=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_8017Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite72] - Interface of composite service Service1a must be subset of the interface declared by promoted component service. Callback interface doesn't match
ASM_8018=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient] - [ASM50004,JCA30002,JCI80001] Component service interface incompatible with implementation service interface: Component = TestClient Service = TestInvocation
ASM_8019=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_8019, Artifact: Test_ASM_8019.composite] - The interface.wsdl interface {http://test.sca.oasisopen.org/}Service1 element can only have a remotable attribute with the value "true" as WSDL interface are assumed to be remotable by default. The value that was found is: false.
Modified: tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java?rev=982458&r1=982457&r2=982458&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java Thu Aug 5 03:01:09 2010
@@ -105,10 +105,7 @@ public class CompositePolicyBuilderImpl
}
for (Endpoint ep : componentService.getEndpoints()) {
- if (componentService.getInterfaceContract() != null) {
- // Inherit from the component.service.interface
- inherit(ep, null, true, componentService.getInterfaceContract().getInterface());
- }
+
// Inherit from binding
inherit(ep, null, true, ep.getBinding());
@@ -116,7 +113,12 @@ public class CompositePolicyBuilderImpl
// Inherit from composite/component/service
inherit(ep, null, true, ep.getService(), ep.getComponent(), composite );
-
+ if (componentService.getInterfaceContract() != null) {
+ // Inherit from the component.service.interface
+ // Do not check mutual exclusion here.. interfaces do not follow normal rules
+ // of the structural hierarchy (Policy spec 4.10)
+ inherit(ep, null, false, componentService.getInterfaceContract().getInterface());
+ }
// Replace profile intents with their required intents
// Replace unqualified intents if there is a qualified intent in the list
@@ -159,19 +161,19 @@ public class CompositePolicyBuilderImpl
}
for (EndpointReference epr : componentReference.getEndpointReferences()) {
-
- // Inherit from the component.reference.interface
- if (componentReference.getInterfaceContract() != null) {
- inherit(epr, null, true, componentReference.getInterfaceContract().getInterface());
- }
-
+
// Inherit from binding
inherit(epr, null, true, epr.getBinding());
// Inherit from composite/component/reference
inherit(epr, null, true, epr.getReference(), epr.getComponent(), composite);
-
+ // Inherit from the component.reference.interface
+ if (componentReference.getInterfaceContract() != null) {
+ // Do not check mutual exclusion here.. interfaces do not follow normal rules
+ // of the structural hierarchy (Policy spec 4.10)
+ inherit(epr, null, true, componentReference.getInterfaceContract().getInterface());
+ }
// Replace profile intents with their required intents
// Replace unqualified intents if there is a qualified intent in the list