You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Greg Dritschler (JIRA)" <de...@tuscany.apache.org> on 2009/09/03 03:01:33 UTC

[jira] Created: (TUSCANY-3256) PolicyConfigurationException raised incorrectly when using operation level policy

PolicyConfigurationException raised incorrectly when using operation level policy
---------------------------------------------------------------------------------

                 Key: TUSCANY-3256
                 URL: https://issues.apache.org/jira/browse/TUSCANY-3256
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Policy
            Reporter: Greg Dritschler
            Priority: Minor


A PolicyConfigurationException may be raised incorrectly when using operation policy as shown in the example below.

    <composite ...>
        <component ... requires='A'>
            <implementation.java class="test.MyServiceImpl"/>
            <service name="MyService">
                <operation name="setXYZZY" requires="B"/>
            </service>
        </component>
    </composite>

Let's say intent 'A' constrains an implementation rather than a binding.  Constraints aren't examined until the final step of propagating the intents into the binding.  So 'A' gets inherited by the service and then the service operation.  Now the code in PolicyComputationUtil.addInheritedOpConfOnBindings gets control to inherit the service operation intents to the binding.  If it can find a matching operation element under the binding, it goes through logic that applies the constraint (among among things).  This would keep 'A' from being inherited by the binding level.  However if it can't find an operation element under the binding, it simply adds a new operation element without doing any checking on it.  This leads to a PolicyConfigurationException because there is no policy that applies to the binding and satisfies  'A'.

I am attaching a patch that changes the logic in PolicyComputationUtil.addInheritedOpConfOnBindings so that added binding operations go through the same logic as existing operations.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TUSCANY-3256) PolicyConfigurationException raised incorrectly when using operation level policy

Posted by "Luciano Resende (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12751583#action_12751583 ] 

Luciano Resende commented on TUSCANY-3256:
------------------------------------------

I was having issues trying to apply the patch to 1.5.1, and would like to confirm which code stream is this patch intended to ? 
Also, it would be good to provide a test case to avoid similar failures in this area going forward.

> PolicyConfigurationException raised incorrectly when using operation level policy
> ---------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3256
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3256
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Policy
>            Reporter: Greg Dritschler
>            Priority: Minor
>         Attachments: TUSCANY-3256.patch
>
>
> A PolicyConfigurationException may be raised incorrectly when using operation policy as shown in the example below.
>     <composite ...>
>         <component ... requires='A'>
>             <implementation.java class="test.MyServiceImpl"/>
>             <service name="MyService">
>                 <operation name="setXYZZY" requires="B"/>
>             </service>
>         </component>
>     </composite>
> Let's say intent 'A' constrains an implementation rather than a binding.  Constraints aren't examined until the final step of propagating the intents into the binding.  So 'A' gets inherited by the service and then the service operation.  Now the code in PolicyComputationUtil.addInheritedOpConfOnBindings gets control to inherit the service operation intents to the binding.  If it can find a matching operation element under the binding, it goes through logic that applies the constraint (among among things).  This would keep 'A' from being inherited by the binding level.  However if it can't find an operation element under the binding, it simply adds a new operation element without doing any checking on it.  This leads to a PolicyConfigurationException because there is no policy that applies to the binding and satisfies  'A'.
> I am attaching a patch that changes the logic in PolicyComputationUtil.addInheritedOpConfOnBindings so that added binding operations go through the same logic as existing operations.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (TUSCANY-3256) PolicyConfigurationException raised incorrectly when using operation level policy

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

Luciano Resende resolved TUSCANY-3256.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: Java-SCA-Next

Thanks Greg, patch applied in both 1.x and 1.5.1.

> PolicyConfigurationException raised incorrectly when using operation level policy
> ---------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3256
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3256
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Policy
>    Affects Versions: Java-SCA-1.5.1
>            Reporter: Greg Dritschler
>            Assignee: Luciano Resende
>            Priority: Minor
>             Fix For: Java-SCA-1.5.1, Java-SCA-Next
>
>         Attachments: TUSCANY-3256-1.5.1.patch, TUSCANY-3256.patch
>
>
> A PolicyConfigurationException may be raised incorrectly when using operation policy as shown in the example below.
>     <composite ...>
>         <component ... requires='A'>
>             <implementation.java class="test.MyServiceImpl"/>
>             <service name="MyService">
>                 <operation name="setXYZZY" requires="B"/>
>             </service>
>         </component>
>     </composite>
> Let's say intent 'A' constrains an implementation rather than a binding.  Constraints aren't examined until the final step of propagating the intents into the binding.  So 'A' gets inherited by the service and then the service operation.  Now the code in PolicyComputationUtil.addInheritedOpConfOnBindings gets control to inherit the service operation intents to the binding.  If it can find a matching operation element under the binding, it goes through logic that applies the constraint (among among things).  This would keep 'A' from being inherited by the binding level.  However if it can't find an operation element under the binding, it simply adds a new operation element without doing any checking on it.  This leads to a PolicyConfigurationException because there is no policy that applies to the binding and satisfies  'A'.
> I am attaching a patch that changes the logic in PolicyComputationUtil.addInheritedOpConfOnBindings so that added binding operations go through the same logic as existing operations.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (TUSCANY-3256) PolicyConfigurationException raised incorrectly when using operation level policy

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

Luciano Resende reassigned TUSCANY-3256:
----------------------------------------

    Assignee: Luciano Resende

> PolicyConfigurationException raised incorrectly when using operation level policy
> ---------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3256
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3256
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Policy
>    Affects Versions: Java-SCA-1.5.1
>            Reporter: Greg Dritschler
>            Assignee: Luciano Resende
>            Priority: Minor
>             Fix For: Java-SCA-1.5.1
>
>         Attachments: TUSCANY-3256-1.5.1.patch, TUSCANY-3256.patch
>
>
> A PolicyConfigurationException may be raised incorrectly when using operation policy as shown in the example below.
>     <composite ...>
>         <component ... requires='A'>
>             <implementation.java class="test.MyServiceImpl"/>
>             <service name="MyService">
>                 <operation name="setXYZZY" requires="B"/>
>             </service>
>         </component>
>     </composite>
> Let's say intent 'A' constrains an implementation rather than a binding.  Constraints aren't examined until the final step of propagating the intents into the binding.  So 'A' gets inherited by the service and then the service operation.  Now the code in PolicyComputationUtil.addInheritedOpConfOnBindings gets control to inherit the service operation intents to the binding.  If it can find a matching operation element under the binding, it goes through logic that applies the constraint (among among things).  This would keep 'A' from being inherited by the binding level.  However if it can't find an operation element under the binding, it simply adds a new operation element without doing any checking on it.  This leads to a PolicyConfigurationException because there is no policy that applies to the binding and satisfies  'A'.
> I am attaching a patch that changes the logic in PolicyComputationUtil.addInheritedOpConfOnBindings so that added binding operations go through the same logic as existing operations.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TUSCANY-3256) PolicyConfigurationException raised incorrectly when using operation level policy

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

Greg Dritschler updated TUSCANY-3256:
-------------------------------------

    Attachment: TUSCANY-3256-1.5.1.patch

Attaching 1.5.1 version of patch.

> PolicyConfigurationException raised incorrectly when using operation level policy
> ---------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3256
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3256
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Policy
>            Reporter: Greg Dritschler
>            Priority: Minor
>         Attachments: TUSCANY-3256.patch
>
>
> A PolicyConfigurationException may be raised incorrectly when using operation policy as shown in the example below.
>     <composite ...>
>         <component ... requires='A'>
>             <implementation.java class="test.MyServiceImpl"/>
>             <service name="MyService">
>                 <operation name="setXYZZY" requires="B"/>
>             </service>
>         </component>
>     </composite>
> Let's say intent 'A' constrains an implementation rather than a binding.  Constraints aren't examined until the final step of propagating the intents into the binding.  So 'A' gets inherited by the service and then the service operation.  Now the code in PolicyComputationUtil.addInheritedOpConfOnBindings gets control to inherit the service operation intents to the binding.  If it can find a matching operation element under the binding, it goes through logic that applies the constraint (among among things).  This would keep 'A' from being inherited by the binding level.  However if it can't find an operation element under the binding, it simply adds a new operation element without doing any checking on it.  This leads to a PolicyConfigurationException because there is no policy that applies to the binding and satisfies  'A'.
> I am attaching a patch that changes the logic in PolicyComputationUtil.addInheritedOpConfOnBindings so that added binding operations go through the same logic as existing operations.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TUSCANY-3256) PolicyConfigurationException raised incorrectly when using operation level policy

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

Greg Dritschler updated TUSCANY-3256:
-------------------------------------

    Attachment: TUSCANY-3256.patch

> PolicyConfigurationException raised incorrectly when using operation level policy
> ---------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3256
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3256
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Policy
>            Reporter: Greg Dritschler
>            Priority: Minor
>         Attachments: TUSCANY-3256.patch
>
>
> A PolicyConfigurationException may be raised incorrectly when using operation policy as shown in the example below.
>     <composite ...>
>         <component ... requires='A'>
>             <implementation.java class="test.MyServiceImpl"/>
>             <service name="MyService">
>                 <operation name="setXYZZY" requires="B"/>
>             </service>
>         </component>
>     </composite>
> Let's say intent 'A' constrains an implementation rather than a binding.  Constraints aren't examined until the final step of propagating the intents into the binding.  So 'A' gets inherited by the service and then the service operation.  Now the code in PolicyComputationUtil.addInheritedOpConfOnBindings gets control to inherit the service operation intents to the binding.  If it can find a matching operation element under the binding, it goes through logic that applies the constraint (among among things).  This would keep 'A' from being inherited by the binding level.  However if it can't find an operation element under the binding, it simply adds a new operation element without doing any checking on it.  This leads to a PolicyConfigurationException because there is no policy that applies to the binding and satisfies  'A'.
> I am attaching a patch that changes the logic in PolicyComputationUtil.addInheritedOpConfOnBindings so that added binding operations go through the same logic as existing operations.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TUSCANY-3256) PolicyConfigurationException raised incorrectly when using operation level policy

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

Greg Dritschler updated TUSCANY-3256:
-------------------------------------

    Attachment: TUSCANY-3256-1.5.1.patch

> PolicyConfigurationException raised incorrectly when using operation level policy
> ---------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3256
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3256
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Policy
>            Reporter: Greg Dritschler
>            Priority: Minor
>         Attachments: TUSCANY-3256-1.5.1.patch, TUSCANY-3256.patch
>
>
> A PolicyConfigurationException may be raised incorrectly when using operation policy as shown in the example below.
>     <composite ...>
>         <component ... requires='A'>
>             <implementation.java class="test.MyServiceImpl"/>
>             <service name="MyService">
>                 <operation name="setXYZZY" requires="B"/>
>             </service>
>         </component>
>     </composite>
> Let's say intent 'A' constrains an implementation rather than a binding.  Constraints aren't examined until the final step of propagating the intents into the binding.  So 'A' gets inherited by the service and then the service operation.  Now the code in PolicyComputationUtil.addInheritedOpConfOnBindings gets control to inherit the service operation intents to the binding.  If it can find a matching operation element under the binding, it goes through logic that applies the constraint (among among things).  This would keep 'A' from being inherited by the binding level.  However if it can't find an operation element under the binding, it simply adds a new operation element without doing any checking on it.  This leads to a PolicyConfigurationException because there is no policy that applies to the binding and satisfies  'A'.
> I am attaching a patch that changes the logic in PolicyComputationUtil.addInheritedOpConfOnBindings so that added binding operations go through the same logic as existing operations.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TUSCANY-3256) PolicyConfigurationException raised incorrectly when using operation level policy

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

Simon Laws updated TUSCANY-3256:
--------------------------------

    Affects Version/s: Java-SCA-1.5.1
        Fix Version/s: Java-SCA-1.5.1

Needs doing in 1.5.1 I guess

> PolicyConfigurationException raised incorrectly when using operation level policy
> ---------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3256
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3256
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Policy
>    Affects Versions: Java-SCA-1.5.1
>            Reporter: Greg Dritschler
>            Priority: Minor
>             Fix For: Java-SCA-1.5.1
>
>         Attachments: TUSCANY-3256-1.5.1.patch, TUSCANY-3256.patch
>
>
> A PolicyConfigurationException may be raised incorrectly when using operation policy as shown in the example below.
>     <composite ...>
>         <component ... requires='A'>
>             <implementation.java class="test.MyServiceImpl"/>
>             <service name="MyService">
>                 <operation name="setXYZZY" requires="B"/>
>             </service>
>         </component>
>     </composite>
> Let's say intent 'A' constrains an implementation rather than a binding.  Constraints aren't examined until the final step of propagating the intents into the binding.  So 'A' gets inherited by the service and then the service operation.  Now the code in PolicyComputationUtil.addInheritedOpConfOnBindings gets control to inherit the service operation intents to the binding.  If it can find a matching operation element under the binding, it goes through logic that applies the constraint (among among things).  This would keep 'A' from being inherited by the binding level.  However if it can't find an operation element under the binding, it simply adds a new operation element without doing any checking on it.  This leads to a PolicyConfigurationException because there is no policy that applies to the binding and satisfies  'A'.
> I am attaching a patch that changes the logic in PolicyComputationUtil.addInheritedOpConfOnBindings so that added binding operations go through the same logic as existing operations.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TUSCANY-3256) PolicyConfigurationException raised incorrectly when using operation level policy

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

Greg Dritschler updated TUSCANY-3256:
-------------------------------------

    Attachment:     (was: TUSCANY-3256-1.5.1.patch)

> PolicyConfigurationException raised incorrectly when using operation level policy
> ---------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3256
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3256
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Policy
>            Reporter: Greg Dritschler
>            Priority: Minor
>         Attachments: TUSCANY-3256.patch
>
>
> A PolicyConfigurationException may be raised incorrectly when using operation policy as shown in the example below.
>     <composite ...>
>         <component ... requires='A'>
>             <implementation.java class="test.MyServiceImpl"/>
>             <service name="MyService">
>                 <operation name="setXYZZY" requires="B"/>
>             </service>
>         </component>
>     </composite>
> Let's say intent 'A' constrains an implementation rather than a binding.  Constraints aren't examined until the final step of propagating the intents into the binding.  So 'A' gets inherited by the service and then the service operation.  Now the code in PolicyComputationUtil.addInheritedOpConfOnBindings gets control to inherit the service operation intents to the binding.  If it can find a matching operation element under the binding, it goes through logic that applies the constraint (among among things).  This would keep 'A' from being inherited by the binding level.  However if it can't find an operation element under the binding, it simply adds a new operation element without doing any checking on it.  This leads to a PolicyConfigurationException because there is no policy that applies to the binding and satisfies  'A'.
> I am attaching a patch that changes the logic in PolicyComputationUtil.addInheritedOpConfOnBindings so that added binding operations go through the same logic as existing operations.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.