You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Simon Laws (JIRA)" <de...@tuscany.apache.org> on 2011/06/13 17:59:51 UTC

[jira] [Created] (TUSCANY-3873) Policy matching fails for reference with target specified

Policy matching fails for reference with target specified
---------------------------------------------------------

                 Key: TUSCANY-3873
                 URL: https://issues.apache.org/jira/browse/TUSCANY-3873
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Policy
    Affects Versions: Java-SCA-2.0-M5
            Reporter: Simon Laws
            Assignee: Simon Laws
             Fix For: Java-SCA-2.0


I'm putting a simple test together which has a composite which looks like:

<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
           targetNamespace="http://www.tuscany.apache.org/itests/policy/interceptors"
		   xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
		   xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
           name="HelloWorld">

    <component name="HelloWorldClient">
        <implementation.java class="helloworld.HelloWorldClient"/>
        <reference name="helloWorldWS"
                   target="HelloWorldService/HelloWorld/BindingWS"
                   requires="tuscany:testIntent"/>
    </component>
    
    <component name="HelloWorldService">
		<implementation.java class="helloworld.HelloWorldService"/>
	    <service name="HelloWorld" requires="tuscany:testIntent">  
	        <binding.ws name="BindingWS"/>
	    </service>		
    </component>
    
</composite>

And a definitions.xml file which looks like:

<definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" 
             targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
    		 xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" 
    		 xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">

    <intent name="testIntent" constrains="sca:implementation sca:binding">
        <description>a test intent</description>
    </intent>

    <sca:policySet name="TestInteractonPolicySet"
                   attachTo="//sca:binding.ws"
                   provides="tuscany:testIntent"
                   appliesTo="//sca:binding.ws">
        <tuscany:testPolicy testString="interaction"/>
    </sca:policySet>
    
    <sca:policySet name="TestImplementationPolicySet"
                   attachTo="//sca:implementation.java"
                   provides="tuscany:testIntent"
                   appliesTo="//sca:implementation.java">
        <tuscany:testPolicy testString="implementation"/> 
    </sca:policySet>      
      
</definitions>

I had though when originally implementing the matching algorithm that the policy sets at the reference would include those from the service binding in this case where the reference doesn't specify a binding. This appears not to be the case at the moment.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (TUSCANY-3873) Policy matching fails for reference with target specified

Posted by "Simon Laws (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-3873?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Laws closed TUSCANY-3873.
-------------------------------

    Resolution: Fixed

Change committed at revision 1136386  to copy policy from the service to the reference when the reference has a target but no policy. 


> Policy matching fails for reference with target specified
> ---------------------------------------------------------
>
>                 Key: TUSCANY-3873
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3873
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Policy
>    Affects Versions: Java-SCA-2.0-M5
>            Reporter: Simon Laws
>            Assignee: Simon Laws
>             Fix For: Java-SCA-2.0
>
>
> I'm putting a simple test together which has a composite which looks like:
> <composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
>            targetNamespace="http://www.tuscany.apache.org/itests/policy/interceptors"
> 		   xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
> 		   xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
>            name="HelloWorld">
>     <component name="HelloWorldClient">
>         <implementation.java class="helloworld.HelloWorldClient"/>
>         <reference name="helloWorldWS"
>                    target="HelloWorldService/HelloWorld/BindingWS"
>                    requires="tuscany:testIntent"/>
>     </component>
>     
>     <component name="HelloWorldService">
> 		<implementation.java class="helloworld.HelloWorldService"/>
> 	    <service name="HelloWorld" requires="tuscany:testIntent">  
> 	        <binding.ws name="BindingWS"/>
> 	    </service>		
>     </component>
>     
> </composite>
> And a definitions.xml file which looks like:
> <definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" 
>              targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
>     		 xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" 
>     		 xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
>     <intent name="testIntent" constrains="sca:implementation sca:binding">
>         <description>a test intent</description>
>     </intent>
>     <sca:policySet name="TestInteractonPolicySet"
>                    attachTo="//sca:binding.ws"
>                    provides="tuscany:testIntent"
>                    appliesTo="//sca:binding.ws">
>         <tuscany:testPolicy testString="interaction"/>
>     </sca:policySet>
>     
>     <sca:policySet name="TestImplementationPolicySet"
>                    attachTo="//sca:implementation.java"
>                    provides="tuscany:testIntent"
>                    appliesTo="//sca:implementation.java">
>         <tuscany:testPolicy testString="implementation"/> 
>     </sca:policySet>      
>       
> </definitions>
> I had though when originally implementing the matching algorithm that the policy sets at the reference would include those from the service binding in this case where the reference doesn't specify a binding. This appears not to be the case at the moment.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Reopened] (TUSCANY-3873) Policy matching fails for reference with target specified

Posted by "Simon Laws (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-3873?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Laws reopened TUSCANY-3873:
---------------------------------


Reopen as we need to run the appliesTo algorithm against a matched EndpointReference, We can't do this at build time as the binding is not known then. 

> Policy matching fails for reference with target specified
> ---------------------------------------------------------
>
>                 Key: TUSCANY-3873
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3873
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Policy
>    Affects Versions: Java-SCA-2.0-M5
>            Reporter: Simon Laws
>            Assignee: Simon Laws
>             Fix For: Java-SCA-2.0
>
>
> I'm putting a simple test together which has a composite which looks like:
> <composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
>            targetNamespace="http://www.tuscany.apache.org/itests/policy/interceptors"
> 		   xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
> 		   xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
>            name="HelloWorld">
>     <component name="HelloWorldClient">
>         <implementation.java class="helloworld.HelloWorldClient"/>
>         <reference name="helloWorldWS"
>                    target="HelloWorldService/HelloWorld/BindingWS"
>                    requires="tuscany:testIntent"/>
>     </component>
>     
>     <component name="HelloWorldService">
> 		<implementation.java class="helloworld.HelloWorldService"/>
> 	    <service name="HelloWorld" requires="tuscany:testIntent">  
> 	        <binding.ws name="BindingWS"/>
> 	    </service>		
>     </component>
>     
> </composite>
> And a definitions.xml file which looks like:
> <definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" 
>              targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
>     		 xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" 
>     		 xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
>     <intent name="testIntent" constrains="sca:implementation sca:binding">
>         <description>a test intent</description>
>     </intent>
>     <sca:policySet name="TestInteractonPolicySet"
>                    attachTo="//sca:binding.ws"
>                    provides="tuscany:testIntent"
>                    appliesTo="//sca:binding.ws">
>         <tuscany:testPolicy testString="interaction"/>
>     </sca:policySet>
>     
>     <sca:policySet name="TestImplementationPolicySet"
>                    attachTo="//sca:implementation.java"
>                    provides="tuscany:testIntent"
>                    appliesTo="//sca:implementation.java">
>         <tuscany:testPolicy testString="implementation"/> 
>     </sca:policySet>      
>       
> </definitions>
> I had though when originally implementing the matching algorithm that the policy sets at the reference would include those from the service binding in this case where the reference doesn't specify a binding. This appears not to be the case at the moment.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira