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/08/03 22:15:14 UTC

[jira] Created: (TUSCANY-3195) Inherently-provided intents do not work at operation level

Inherently-provided intents do not work at operation level
----------------------------------------------------------

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


PolicyConfigurationUtil.computeIntentsForOperations() contains this code:

            //exclude intents that are inherently supported by the parent
            //attachpoint-type (binding-type  / implementation-type)
            if ( attachPointType != null ) {
                List<Intent> requiredIntents = new ArrayList<Intent>(confOp.getRequiredIntents());
                for ( Intent intent : requiredIntents ) {
                    if ( isProvidedInherently(attachPointType, intent) ) {
                        confOp.getRequiredIntents().remove(intent);
                    }
                }
            }

"isProvidedInherently" includes intents that *may* be provided *if requested*.  It's hard for the binding or implementation to provide the intent if it's been removed from the model.

The way this was supposed to work is that the code temporarily removes the inherently-provided intents for the purposes of policy set computation, then puts them back so that bindings and implementations can find them.  In fact the operations determineApplicableBindingPolicySets() and determineApplicableImplementationPolicySets() do exactly that.  Unfortunately computeIntentsForOperations() is called first in all the various code paths that compute policy sets.

I suspect the code to remove the inherently-provided intents can simply be removed from computeIntentsForOperations().

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


[jira] Updated: (TUSCANY-3195) Inherently-provided intents do not work at operation level

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

ant elder updated TUSCANY-3195:
-------------------------------


Left off the change revision - r801231 in 1.x-brn. I'll copy this to 1.5.1 if no one sees issues with the fix.

> Inherently-provided intents do not work at operation level
> ----------------------------------------------------------
>
>                 Key: TUSCANY-3195
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3195
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Policy
>            Reporter: Greg Dritschler
>
> PolicyConfigurationUtil.computeIntentsForOperations() contains this code:
>             //exclude intents that are inherently supported by the parent
>             //attachpoint-type (binding-type  / implementation-type)
>             if ( attachPointType != null ) {
>                 List<Intent> requiredIntents = new ArrayList<Intent>(confOp.getRequiredIntents());
>                 for ( Intent intent : requiredIntents ) {
>                     if ( isProvidedInherently(attachPointType, intent) ) {
>                         confOp.getRequiredIntents().remove(intent);
>                     }
>                 }
>             }
> "isProvidedInherently" includes intents that *may* be provided *if requested*.  It's hard for the binding or implementation to provide the intent if it's been removed from the model.
> The way this was supposed to work is that the code temporarily removes the inherently-provided intents for the purposes of policy set computation, then puts them back so that bindings and implementations can find them.  In fact the operations determineApplicableBindingPolicySets() and determineApplicableImplementationPolicySets() do exactly that.  Unfortunately computeIntentsForOperations() is called first in all the various code paths that compute policy sets.
> I suspect the code to remove the inherently-provided intents can simply be removed from computeIntentsForOperations().

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


[jira] Closed: (TUSCANY-3195) Inherently-provided intents do not work at operation level

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

ant elder closed TUSCANY-3195.
------------------------------

    Resolution: Fixed

I've had a look and whats suggested here by Greg seems to make sense and looks right to me so I've made the change to take out the code that removes the inherently-provided intents from computeIntentsForOperations(), build runs ok though there are not a lot of tests in this area.

> Inherently-provided intents do not work at operation level
> ----------------------------------------------------------
>
>                 Key: TUSCANY-3195
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3195
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Policy
>            Reporter: Greg Dritschler
>
> PolicyConfigurationUtil.computeIntentsForOperations() contains this code:
>             //exclude intents that are inherently supported by the parent
>             //attachpoint-type (binding-type  / implementation-type)
>             if ( attachPointType != null ) {
>                 List<Intent> requiredIntents = new ArrayList<Intent>(confOp.getRequiredIntents());
>                 for ( Intent intent : requiredIntents ) {
>                     if ( isProvidedInherently(attachPointType, intent) ) {
>                         confOp.getRequiredIntents().remove(intent);
>                     }
>                 }
>             }
> "isProvidedInherently" includes intents that *may* be provided *if requested*.  It's hard for the binding or implementation to provide the intent if it's been removed from the model.
> The way this was supposed to work is that the code temporarily removes the inherently-provided intents for the purposes of policy set computation, then puts them back so that bindings and implementations can find them.  In fact the operations determineApplicableBindingPolicySets() and determineApplicableImplementationPolicySets() do exactly that.  Unfortunately computeIntentsForOperations() is called first in all the various code paths that compute policy sets.
> I suspect the code to remove the inherently-provided intents can simply be removed from computeIntentsForOperations().

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


[jira] Commented: (TUSCANY-3195) Inherently-provided intents do not work at operation level

Posted by "Simon Laws (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740547#action_12740547 ] 

Simon Laws commented on TUSCANY-3195:
-------------------------------------

Looks ok to me and I got a clean build.

> Inherently-provided intents do not work at operation level
> ----------------------------------------------------------
>
>                 Key: TUSCANY-3195
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3195
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Policy
>            Reporter: Greg Dritschler
>
> PolicyConfigurationUtil.computeIntentsForOperations() contains this code:
>             //exclude intents that are inherently supported by the parent
>             //attachpoint-type (binding-type  / implementation-type)
>             if ( attachPointType != null ) {
>                 List<Intent> requiredIntents = new ArrayList<Intent>(confOp.getRequiredIntents());
>                 for ( Intent intent : requiredIntents ) {
>                     if ( isProvidedInherently(attachPointType, intent) ) {
>                         confOp.getRequiredIntents().remove(intent);
>                     }
>                 }
>             }
> "isProvidedInherently" includes intents that *may* be provided *if requested*.  It's hard for the binding or implementation to provide the intent if it's been removed from the model.
> The way this was supposed to work is that the code temporarily removes the inherently-provided intents for the purposes of policy set computation, then puts them back so that bindings and implementations can find them.  In fact the operations determineApplicableBindingPolicySets() and determineApplicableImplementationPolicySets() do exactly that.  Unfortunately computeIntentsForOperations() is called first in all the various code paths that compute policy sets.
> I suspect the code to remove the inherently-provided intents can simply be removed from computeIntentsForOperations().

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


[jira] Commented: (TUSCANY-3195) Inherently-provided intents do not work at operation level

Posted by "ant elder (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740553#action_12740553 ] 

ant elder commented on TUSCANY-3195:
------------------------------------

Merged to 1.5.1 branch in r802000

> Inherently-provided intents do not work at operation level
> ----------------------------------------------------------
>
>                 Key: TUSCANY-3195
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3195
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Policy
>            Reporter: Greg Dritschler
>
> PolicyConfigurationUtil.computeIntentsForOperations() contains this code:
>             //exclude intents that are inherently supported by the parent
>             //attachpoint-type (binding-type  / implementation-type)
>             if ( attachPointType != null ) {
>                 List<Intent> requiredIntents = new ArrayList<Intent>(confOp.getRequiredIntents());
>                 for ( Intent intent : requiredIntents ) {
>                     if ( isProvidedInherently(attachPointType, intent) ) {
>                         confOp.getRequiredIntents().remove(intent);
>                     }
>                 }
>             }
> "isProvidedInherently" includes intents that *may* be provided *if requested*.  It's hard for the binding or implementation to provide the intent if it's been removed from the model.
> The way this was supposed to work is that the code temporarily removes the inherently-provided intents for the purposes of policy set computation, then puts them back so that bindings and implementations can find them.  In fact the operations determineApplicableBindingPolicySets() and determineApplicableImplementationPolicySets() do exactly that.  Unfortunately computeIntentsForOperations() is called first in all the various code paths that compute policy sets.
> I suspect the code to remove the inherently-provided intents can simply be removed from computeIntentsForOperations().

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