You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Vamsavardhana Reddy (JIRA)" <tu...@ws.apache.org> on 2008/04/26 11:42:56 UTC

[jira] Created: (TUSCANY-2272) @Init and @Destroy annotations on a non-public method

@Init and @Destroy annotations on a non-public method 
------------------------------------------------------

                 Key: TUSCANY-2272
                 URL: https://issues.apache.org/jira/browse/TUSCANY-2272
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Java Implementation Extension, Java SCA Verification Tests
    Affects Versions: Java-SCA-1.2
            Reporter: Vamsavardhana Reddy
            Assignee: Vamsavardhana Reddy
             Fix For: Java-SCA-Next


Java Common Annotations and APIs Specification v1.00 - Sec 1.2.4 - Lines 265 to 269:
265 An implementation type may allow component implementations to declare lifecycle methods that are
266 called when an implementation is instantiated or the scope is expired. @Init denotes the method to be
267 called upon first use of an instance during the lifetime of the scope (except for composite scoped
268 implementation marked to eagerly initialize, see Section XXX). @Destroy specifies the method to be called
269 when the scope ends. Note that only public, no argument methods may be annotated as lifecycle methods.

Currently @Init and @Destroy annotations on a protected method does not result in an error or a warning whereas these annotations on a private method results in a warning.  Should it result in an error in both cases?

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


[jira] Updated: (TUSCANY-2272) @Init and @Destroy annotations on a non-public method

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

Vamsavardhana Reddy updated TUSCANY-2272:
-----------------------------------------

    Attachment: TUSCANY-2272.patch

TUSCANY-2272.patch: Throws an exception if @Init and @Destroy annotations are present on a protected or a private method.

**This patch can use a review especially the change to JavaClassIntrospectorImpl .  Not sure if the change will have any unwanted side effects.

> @Init and @Destroy annotations on a non-public method 
> ------------------------------------------------------
>
>                 Key: TUSCANY-2272
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2272
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Java Implementation Extension, Java SCA Verification Tests
>    Affects Versions: Java-SCA-1.2
>            Reporter: Vamsavardhana Reddy
>            Assignee: Vamsavardhana Reddy
>             Fix For: Java-SCA-Next
>
>         Attachments: TUSCANY-2272.patch
>
>
> Java Common Annotations and APIs Specification v1.00 - Sec 1.2.4 - Lines 265 to 269:
> 265 An implementation type may allow component implementations to declare lifecycle methods that are
> 266 called when an implementation is instantiated or the scope is expired. @Init denotes the method to be
> 267 called upon first use of an instance during the lifetime of the scope (except for composite scoped
> 268 implementation marked to eagerly initialize, see Section XXX). @Destroy specifies the method to be called
> 269 when the scope ends. *Note that only public, no argument methods may be annotated as lifecycle methods.*
> Currently @Init and @Destroy annotations on a protected method do not result in an error or a warning whereas these annotations on a private method result in a warning.  Should it result in an error in both cases?

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


[jira] Updated: (TUSCANY-2272) @Init and @Destroy annotations on a non-public method

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

Vamsavardhana Reddy updated TUSCANY-2272:
-----------------------------------------

    Component/s:     (was: Java SCA Verification Tests)

> @Init and @Destroy annotations on a non-public method 
> ------------------------------------------------------
>
>                 Key: TUSCANY-2272
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2272
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Java Implementation Extension
>    Affects Versions: Java-SCA-1.2
>            Reporter: Vamsavardhana Reddy
>            Assignee: Vamsavardhana Reddy
>             Fix For: Java-SCA-Next
>
>         Attachments: TUSCANY-2272.patch
>
>
> Java Common Annotations and APIs Specification v1.00 - Sec 1.2.4 - Lines 265 to 269:
> 265 An implementation type may allow component implementations to declare lifecycle methods that are
> 266 called when an implementation is instantiated or the scope is expired. @Init denotes the method to be
> 267 called upon first use of an instance during the lifetime of the scope (except for composite scoped
> 268 implementation marked to eagerly initialize, see Section XXX). @Destroy specifies the method to be called
> 269 when the scope ends. *Note that only public, no argument methods may be annotated as lifecycle methods.*
> Currently @Init and @Destroy annotations on a protected method do not result in an error or a warning whereas these annotations on a private method result in a warning.  Should it result in an error in both cases?

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


[jira] Assigned: (TUSCANY-2272) @Init and @Destroy annotations on a non-public method

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

Simon Laws reassigned TUSCANY-2272:
-----------------------------------

    Assignee: Simon Laws  (was: Vamsavardhana Reddy)

> @Init and @Destroy annotations on a non-public method 
> ------------------------------------------------------
>
>                 Key: TUSCANY-2272
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2272
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Java Implementation Extension
>    Affects Versions: Java-SCA-1.2
>            Reporter: Vamsavardhana Reddy
>            Assignee: Simon Laws
>             Fix For: Java-SCA-Next
>
>         Attachments: TUSCANY-2272.patch
>
>
> Java Common Annotations and APIs Specification v1.00 - Sec 1.2.4 - Lines 265 to 269:
> 265 An implementation type may allow component implementations to declare lifecycle methods that are
> 266 called when an implementation is instantiated or the scope is expired. @Init denotes the method to be
> 267 called upon first use of an instance during the lifetime of the scope (except for composite scoped
> 268 implementation marked to eagerly initialize, see Section XXX). @Destroy specifies the method to be called
> 269 when the scope ends. *Note that only public, no argument methods may be annotated as lifecycle methods.*
> Currently @Init and @Destroy annotations on a protected method do not result in an error or a warning whereas these annotations on a private method result in a warning.  Should it result in an error in both cases?

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


[jira] Updated: (TUSCANY-2272) @Init and @Destroy annotations on a non-public method

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

Vamsavardhana Reddy updated TUSCANY-2272:
-----------------------------------------

    Description: 
Java Common Annotations and APIs Specification v1.00 - Sec 1.2.4 - Lines 265 to 269:
265 An implementation type may allow component implementations to declare lifecycle methods that are
266 called when an implementation is instantiated or the scope is expired. @Init denotes the method to be
267 called upon first use of an instance during the lifetime of the scope (except for composite scoped
268 implementation marked to eagerly initialize, see Section XXX). @Destroy specifies the method to be called
269 when the scope ends. *Note that only public, no argument methods may be annotated as lifecycle methods.*

Currently @Init and @Destroy annotations on a protected method do not result in an error or a warning whereas these annotations on a private method result in a warning.  Should it result in an error in both cases?

  was:
Java Common Annotations and APIs Specification v1.00 - Sec 1.2.4 - Lines 265 to 269:
265 An implementation type may allow component implementations to declare lifecycle methods that are
266 called when an implementation is instantiated or the scope is expired. @Init denotes the method to be
267 called upon first use of an instance during the lifetime of the scope (except for composite scoped
268 implementation marked to eagerly initialize, see Section XXX). @Destroy specifies the method to be called
269 when the scope ends. *Note that only public, no argument methods may be annotated as lifecycle methods.*

Currently @Init and @Destroy annotations on a protected method does not result in an error or a warning whereas these annotations on a private method results in a warning.  Should it result in an error in both cases?


> @Init and @Destroy annotations on a non-public method 
> ------------------------------------------------------
>
>                 Key: TUSCANY-2272
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2272
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Java Implementation Extension, Java SCA Verification Tests
>    Affects Versions: Java-SCA-1.2
>            Reporter: Vamsavardhana Reddy
>            Assignee: Vamsavardhana Reddy
>             Fix For: Java-SCA-Next
>
>
> Java Common Annotations and APIs Specification v1.00 - Sec 1.2.4 - Lines 265 to 269:
> 265 An implementation type may allow component implementations to declare lifecycle methods that are
> 266 called when an implementation is instantiated or the scope is expired. @Init denotes the method to be
> 267 called upon first use of an instance during the lifetime of the scope (except for composite scoped
> 268 implementation marked to eagerly initialize, see Section XXX). @Destroy specifies the method to be called
> 269 when the scope ends. *Note that only public, no argument methods may be annotated as lifecycle methods.*
> Currently @Init and @Destroy annotations on a protected method do not result in an error or a warning whereas these annotations on a private method result in a warning.  Should it result in an error in both cases?

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


[jira] Resolved: (TUSCANY-2272) @Init and @Destroy annotations on a non-public method

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

Simon Laws resolved TUSCANY-2272.
---------------------------------

    Resolution: Fixed

Hi Vamsi, the patch looks ok to me. I got a clean build. I also temporarily modified one of the conversational tests to make sure I get the error under normal conditions. It worked. We could do with a test that does this so that the JavaClassIntrospector gets run also. I've checked the code in at r652566. Thanks

> @Init and @Destroy annotations on a non-public method 
> ------------------------------------------------------
>
>                 Key: TUSCANY-2272
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2272
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Java Implementation Extension
>    Affects Versions: Java-SCA-1.2
>            Reporter: Vamsavardhana Reddy
>            Assignee: Simon Laws
>             Fix For: Java-SCA-Next
>
>         Attachments: TUSCANY-2272.patch
>
>
> Java Common Annotations and APIs Specification v1.00 - Sec 1.2.4 - Lines 265 to 269:
> 265 An implementation type may allow component implementations to declare lifecycle methods that are
> 266 called when an implementation is instantiated or the scope is expired. @Init denotes the method to be
> 267 called upon first use of an instance during the lifetime of the scope (except for composite scoped
> 268 implementation marked to eagerly initialize, see Section XXX). @Destroy specifies the method to be called
> 269 when the scope ends. *Note that only public, no argument methods may be annotated as lifecycle methods.*
> Currently @Init and @Destroy annotations on a protected method do not result in an error or a warning whereas these annotations on a private method result in a warning.  Should it result in an error in both cases?

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


[jira] Updated: (TUSCANY-2272) @Init and @Destroy annotations on a non-public method

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

Vamsavardhana Reddy updated TUSCANY-2272:
-----------------------------------------

    Description: 
Java Common Annotations and APIs Specification v1.00 - Sec 1.2.4 - Lines 265 to 269:
265 An implementation type may allow component implementations to declare lifecycle methods that are
266 called when an implementation is instantiated or the scope is expired. @Init denotes the method to be
267 called upon first use of an instance during the lifetime of the scope (except for composite scoped
268 implementation marked to eagerly initialize, see Section XXX). @Destroy specifies the method to be called
269 when the scope ends. *Note that only public, no argument methods may be annotated as lifecycle methods.*

Currently @Init and @Destroy annotations on a protected method does not result in an error or a warning whereas these annotations on a private method results in a warning.  Should it result in an error in both cases?

  was:
Java Common Annotations and APIs Specification v1.00 - Sec 1.2.4 - Lines 265 to 269:
265 An implementation type may allow component implementations to declare lifecycle methods that are
266 called when an implementation is instantiated or the scope is expired. @Init denotes the method to be
267 called upon first use of an instance during the lifetime of the scope (except for composite scoped
268 implementation marked to eagerly initialize, see Section XXX). @Destroy specifies the method to be called
269 when the scope ends. Note that only public, no argument methods may be annotated as lifecycle methods.

Currently @Init and @Destroy annotations on a protected method does not result in an error or a warning whereas these annotations on a private method results in a warning.  Should it result in an error in both cases?


> @Init and @Destroy annotations on a non-public method 
> ------------------------------------------------------
>
>                 Key: TUSCANY-2272
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2272
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Java Implementation Extension, Java SCA Verification Tests
>    Affects Versions: Java-SCA-1.2
>            Reporter: Vamsavardhana Reddy
>            Assignee: Vamsavardhana Reddy
>             Fix For: Java-SCA-Next
>
>
> Java Common Annotations and APIs Specification v1.00 - Sec 1.2.4 - Lines 265 to 269:
> 265 An implementation type may allow component implementations to declare lifecycle methods that are
> 266 called when an implementation is instantiated or the scope is expired. @Init denotes the method to be
> 267 called upon first use of an instance during the lifetime of the scope (except for composite scoped
> 268 implementation marked to eagerly initialize, see Section XXX). @Destroy specifies the method to be called
> 269 when the scope ends. *Note that only public, no argument methods may be annotated as lifecycle methods.*
> Currently @Init and @Destroy annotations on a protected method does not result in an error or a warning whereas these annotations on a private method results in a warning.  Should it result in an error in both cases?

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


[jira] Closed: (TUSCANY-2272) @Init and @Destroy annotations on a non-public method

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

Vamsavardhana Reddy closed TUSCANY-2272.
----------------------------------------


> @Init and @Destroy annotations on a non-public method 
> ------------------------------------------------------
>
>                 Key: TUSCANY-2272
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2272
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Java Implementation Extension
>    Affects Versions: Java-SCA-1.2
>            Reporter: Vamsavardhana Reddy
>            Assignee: Simon Laws
>             Fix For: Java-SCA-Next
>
>         Attachments: TUSCANY-2272.patch
>
>
> Java Common Annotations and APIs Specification v1.00 - Sec 1.2.4 - Lines 265 to 269:
> 265 An implementation type may allow component implementations to declare lifecycle methods that are
> 266 called when an implementation is instantiated or the scope is expired. @Init denotes the method to be
> 267 called upon first use of an instance during the lifetime of the scope (except for composite scoped
> 268 implementation marked to eagerly initialize, see Section XXX). @Destroy specifies the method to be called
> 269 when the scope ends. *Note that only public, no argument methods may be annotated as lifecycle methods.*
> Currently @Init and @Destroy annotations on a protected method do not result in an error or a warning whereas these annotations on a private method result in a warning.  Should it result in an error in both cases?

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