You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Mark I. Dinges (JIRA)" <tu...@ws.apache.org> on 2007/04/06 21:15:32 UTC

[jira] Created: (TUSCANY-1204) Support for @requires annotation and requires attribute

Support for @requires annotation and requires attribute
-------------------------------------------------------

                 Key: TUSCANY-1204
                 URL: https://issues.apache.org/jira/browse/TUSCANY-1204
             Project: Tuscany
          Issue Type: New Feature
          Components: Java SCA Model
    Affects Versions: Java-SCA-Future
            Reporter: Mark I. Dinges
             Fix For: Java-SCA-Future


The follow patch is to add annotation and attribute suppot to the model. For @Requires annotation on Service implementaion at the class level the intents will be added to the ComponentType model object. For @Requires annotation on the Service implementation at the operation/method level the intents are added to the Operation Model Object. For @Requires annotations on the Service interface at the class level the intents are added to the ServiceContract model object. For @Requires annotations on the Service interface at the operation/method level the intents are added to the Operation model object. For "requires" attribute that is on the Service in the scdl the intents are added to the ServiceDefinition model object. For "requires" attribute that is on the Reference in the scdl the intents are added to the ReferenceDefinition model object. For "requires" attribute that is on the implementation.java in the scdl the intents are added to the Implementation model object.

I did not want to duplicate code that existed in ServiceProcessor.java so the PolicyProcessor class should be added after the ServiceProcessor in the implementation.scdl. 

    <component name="implementation.PolicyProcessor">
        <system:implementation.system class="org.apache.tuscany.core.implementation.processor.PolicyProcessor"/>
    </component>

PolicyJavaInterfaceProcessor will need to be added as implementation.system Not sure of the most appropiate place to at it with changes that have been happening.



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


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


[jira] Commented: (TUSCANY-1204) Support for @requires annotation and requires attribute

Posted by "Mark I. Dinges (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489429 ] 

Mark I. Dinges commented on TUSCANY-1204:
-----------------------------------------

Your adaptaion of the test case I supplied appears to do the same type of test. Based on the parts changed it does not seem that you put the support in for the handling of the requires attribute in the XML/SCDL. Is this the case? Do you want a new JIRA for that work? Should I reopen this JIRA? Are you adding in under another JIRA?

> Support for @requires annotation and requires attribute
> -------------------------------------------------------
>
>                 Key: TUSCANY-1204
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1204
>             Project: Tuscany
>          Issue Type: New Feature
>          Components: Java SCA Model
>            Reporter: Mark I. Dinges
>         Assigned To: Jean-Sebastien Delfino
>             Fix For: Java-SCA-Next
>
>         Attachments: policyworkdelta.txt
>
>
> The follow patch is to add annotation and attribute suppot to the model. For @Requires annotation on Service implementaion at the class level the intents will be added to the ComponentType model object. For @Requires annotation on the Service implementation at the operation/method level the intents are added to the Operation Model Object. For @Requires annotations on the Service interface at the class level the intents are added to the ServiceContract model object. For @Requires annotations on the Service interface at the operation/method level the intents are added to the Operation model object. For "requires" attribute that is on the Service in the scdl the intents are added to the ServiceDefinition model object. For "requires" attribute that is on the Reference in the scdl the intents are added to the ReferenceDefinition model object. For "requires" attribute that is on the implementation.java in the scdl the intents are added to the Implementation model object.
> I did not want to duplicate code that existed in ServiceProcessor.java so the PolicyProcessor class should be added after the ServiceProcessor in the implementation.scdl. 
>     <component name="implementation.PolicyProcessor">
>         <system:implementation.system class="org.apache.tuscany.core.implementation.processor.PolicyProcessor"/>
>     </component>
> PolicyJavaInterfaceProcessor will need to be added as implementation.system Not sure of the most appropiate place to at it with changes that have been happening.

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


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


[jira] Assigned: (TUSCANY-1204) Support for @requires annotation and requires attribute

Posted by "Jean-Sebastien Delfino (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Sebastien Delfino reassigned TUSCANY-1204:
-----------------------------------------------

    Assignee: Jean-Sebastien Delfino

> Support for @requires annotation and requires attribute
> -------------------------------------------------------
>
>                 Key: TUSCANY-1204
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1204
>             Project: Tuscany
>          Issue Type: New Feature
>          Components: Java SCA Model
>            Reporter: Mark I. Dinges
>         Assigned To: Jean-Sebastien Delfino
>             Fix For: Java-SCA-Next
>
>         Attachments: policyworkdelta.txt
>
>
> The follow patch is to add annotation and attribute suppot to the model. For @Requires annotation on Service implementaion at the class level the intents will be added to the ComponentType model object. For @Requires annotation on the Service implementation at the operation/method level the intents are added to the Operation Model Object. For @Requires annotations on the Service interface at the class level the intents are added to the ServiceContract model object. For @Requires annotations on the Service interface at the operation/method level the intents are added to the Operation model object. For "requires" attribute that is on the Service in the scdl the intents are added to the ServiceDefinition model object. For "requires" attribute that is on the Reference in the scdl the intents are added to the ReferenceDefinition model object. For "requires" attribute that is on the implementation.java in the scdl the intents are added to the Implementation model object.
> I did not want to duplicate code that existed in ServiceProcessor.java so the PolicyProcessor class should be added after the ServiceProcessor in the implementation.scdl. 
>     <component name="implementation.PolicyProcessor">
>         <system:implementation.system class="org.apache.tuscany.core.implementation.processor.PolicyProcessor"/>
>     </component>
> PolicyJavaInterfaceProcessor will need to be added as implementation.system Not sure of the most appropiate place to at it with changes that have been happening.

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


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


[jira] Resolved: (TUSCANY-1204) Support for @requires annotation and requires attribute

Posted by "Jean-Sebastien Delfino (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Sebastien Delfino resolved TUSCANY-1204.
---------------------------------------------

    Resolution: Fixed

Thanks for the patch...

I was not able to apply it as-is to the latest code in the trunk, as the trunk has changed significantly since when this patch was developed, but I have checked in a PolicyProcessor that does the equivalent of what your patch was doing.

Also some lines in the patch were wrapped around column 80, I had to hand edit and fix it to make the patch tool consume it.

@Requires on the implementation class are added to the assembly Implementation model object.
@Requires on service interfaces are added to the corresponding service model object.
@Requires on callback interfaces are added to the corresponding callback model object.
@Requires on operations are turned into Intents containing a corresponding Operation object.

I ported the test case you had contributed to the latest code in trunk, and the test passes, even though I'm not sure if I adapted the test logic to the new policy model structure correctly. It would be great if you could take a look and let me know if I missed anything.

Thanks.

> Support for @requires annotation and requires attribute
> -------------------------------------------------------
>
>                 Key: TUSCANY-1204
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1204
>             Project: Tuscany
>          Issue Type: New Feature
>          Components: Java SCA Model
>            Reporter: Mark I. Dinges
>         Assigned To: Jean-Sebastien Delfino
>             Fix For: Java-SCA-Next
>
>         Attachments: policyworkdelta.txt
>
>
> The follow patch is to add annotation and attribute suppot to the model. For @Requires annotation on Service implementaion at the class level the intents will be added to the ComponentType model object. For @Requires annotation on the Service implementation at the operation/method level the intents are added to the Operation Model Object. For @Requires annotations on the Service interface at the class level the intents are added to the ServiceContract model object. For @Requires annotations on the Service interface at the operation/method level the intents are added to the Operation model object. For "requires" attribute that is on the Service in the scdl the intents are added to the ServiceDefinition model object. For "requires" attribute that is on the Reference in the scdl the intents are added to the ReferenceDefinition model object. For "requires" attribute that is on the implementation.java in the scdl the intents are added to the Implementation model object.
> I did not want to duplicate code that existed in ServiceProcessor.java so the PolicyProcessor class should be added after the ServiceProcessor in the implementation.scdl. 
>     <component name="implementation.PolicyProcessor">
>         <system:implementation.system class="org.apache.tuscany.core.implementation.processor.PolicyProcessor"/>
>     </component>
> PolicyJavaInterfaceProcessor will need to be added as implementation.system Not sure of the most appropiate place to at it with changes that have been happening.

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


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


[jira] Commented: (TUSCANY-1204) Support for @requires annotation and requires attribute

Posted by "Jean-Sebastien Delfino (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488738 ] 

Jean-Sebastien Delfino commented on TUSCANY-1204:
-------------------------------------------------

This code will have to be ported to the latest assembly model and annotation processors. I'll take a look and will do a first pass at porting it. 

> Support for @requires annotation and requires attribute
> -------------------------------------------------------
>
>                 Key: TUSCANY-1204
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1204
>             Project: Tuscany
>          Issue Type: New Feature
>          Components: Java SCA Model
>            Reporter: Mark I. Dinges
>         Assigned To: Jean-Sebastien Delfino
>             Fix For: Java-SCA-Next
>
>         Attachments: policyworkdelta.txt
>
>
> The follow patch is to add annotation and attribute suppot to the model. For @Requires annotation on Service implementaion at the class level the intents will be added to the ComponentType model object. For @Requires annotation on the Service implementation at the operation/method level the intents are added to the Operation Model Object. For @Requires annotations on the Service interface at the class level the intents are added to the ServiceContract model object. For @Requires annotations on the Service interface at the operation/method level the intents are added to the Operation model object. For "requires" attribute that is on the Service in the scdl the intents are added to the ServiceDefinition model object. For "requires" attribute that is on the Reference in the scdl the intents are added to the ReferenceDefinition model object. For "requires" attribute that is on the implementation.java in the scdl the intents are added to the Implementation model object.
> I did not want to duplicate code that existed in ServiceProcessor.java so the PolicyProcessor class should be added after the ServiceProcessor in the implementation.scdl. 
>     <component name="implementation.PolicyProcessor">
>         <system:implementation.system class="org.apache.tuscany.core.implementation.processor.PolicyProcessor"/>
>     </component>
> PolicyJavaInterfaceProcessor will need to be added as implementation.system Not sure of the most appropiate place to at it with changes that have been happening.

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


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


[jira] Updated: (TUSCANY-1204) Support for @requires annotation and requires attribute

Posted by "Mark I. Dinges (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark I. Dinges updated TUSCANY-1204:
------------------------------------

    Attachment: policyworkdelta.txt

svn delta of changes.

> Support for @requires annotation and requires attribute
> -------------------------------------------------------
>
>                 Key: TUSCANY-1204
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1204
>             Project: Tuscany
>          Issue Type: New Feature
>          Components: Java SCA Model
>    Affects Versions: Java-SCA-Future
>            Reporter: Mark I. Dinges
>             Fix For: Java-SCA-Future
>
>         Attachments: policyworkdelta.txt
>
>
> The follow patch is to add annotation and attribute suppot to the model. For @Requires annotation on Service implementaion at the class level the intents will be added to the ComponentType model object. For @Requires annotation on the Service implementation at the operation/method level the intents are added to the Operation Model Object. For @Requires annotations on the Service interface at the class level the intents are added to the ServiceContract model object. For @Requires annotations on the Service interface at the operation/method level the intents are added to the Operation model object. For "requires" attribute that is on the Service in the scdl the intents are added to the ServiceDefinition model object. For "requires" attribute that is on the Reference in the scdl the intents are added to the ReferenceDefinition model object. For "requires" attribute that is on the implementation.java in the scdl the intents are added to the Implementation model object.
> I did not want to duplicate code that existed in ServiceProcessor.java so the PolicyProcessor class should be added after the ServiceProcessor in the implementation.scdl. 
>     <component name="implementation.PolicyProcessor">
>         <system:implementation.system class="org.apache.tuscany.core.implementation.processor.PolicyProcessor"/>
>     </component>
> PolicyJavaInterfaceProcessor will need to be added as implementation.system Not sure of the most appropiate place to at it with changes that have been happening.

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


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


[jira] Commented: (TUSCANY-1204) Support for @requires annotation and requires attribute

Posted by "Jean-Sebastien Delfino (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489537 ] 

Jean-Sebastien Delfino commented on TUSCANY-1204:
-------------------------------------------------

I didn't make changes to support requires and policySets in SCA assembly XML as part of this particular JIRA, because it was pretty much already there in the new model and artifactprocessors for .composites, .componenttypes etc :) I think this support is equivalent to what you were doing as well in your patch.

> Support for @requires annotation and requires attribute
> -------------------------------------------------------
>
>                 Key: TUSCANY-1204
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1204
>             Project: Tuscany
>          Issue Type: New Feature
>          Components: Java SCA Model
>            Reporter: Mark I. Dinges
>         Assigned To: Jean-Sebastien Delfino
>             Fix For: Java-SCA-Next
>
>         Attachments: policyworkdelta.txt
>
>
> The follow patch is to add annotation and attribute suppot to the model. For @Requires annotation on Service implementaion at the class level the intents will be added to the ComponentType model object. For @Requires annotation on the Service implementation at the operation/method level the intents are added to the Operation Model Object. For @Requires annotations on the Service interface at the class level the intents are added to the ServiceContract model object. For @Requires annotations on the Service interface at the operation/method level the intents are added to the Operation model object. For "requires" attribute that is on the Service in the scdl the intents are added to the ServiceDefinition model object. For "requires" attribute that is on the Reference in the scdl the intents are added to the ReferenceDefinition model object. For "requires" attribute that is on the implementation.java in the scdl the intents are added to the Implementation model object.
> I did not want to duplicate code that existed in ServiceProcessor.java so the PolicyProcessor class should be added after the ServiceProcessor in the implementation.scdl. 
>     <component name="implementation.PolicyProcessor">
>         <system:implementation.system class="org.apache.tuscany.core.implementation.processor.PolicyProcessor"/>
>     </component>
> PolicyJavaInterfaceProcessor will need to be added as implementation.system Not sure of the most appropiate place to at it with changes that have been happening.

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


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