You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by keinmensch <ke...@mailhaven.com> on 2010/03/15 13:06:42 UTC
@Destroy Annotation Bug?
Hi!
There seems to be a bug in 2.0M4 preventing the use of @Destroy on
private and protected methods. If @Destroy is used to annotate a method
with package visibility, no exception is thrown but the method is never
called when the component is to be taken out of service.
According to section 10.8 in Service Component Architecture SCA-J Common
Annotations and APIs Specification Version 1.1, such a method may have
any access modifier.
To correct this, remove lines 62-64 in the class
org.apache.tuscany.sca.implementation.java.introspect.impl.DestroyProcessor
in the module implementation-java. Additional modifications required?
Best wishes!
Ivan
Re: @Destroy Annotation Bug?
Posted by keinmensch <ke...@mailhaven.com>.
Raymond Feng wrote:
> Good catch. The latest spec says:
>
> [JCA90004] A method annotated with @Destroy can have any access
> modifier and MUST have a void return type and no arguments.
>
> Do you want to open a JIRA and provide a patch?
Of course! Give me a couple of days.
Best wishes!
Ivan
Re: @Destroy Annotation Bug?
Posted by Raymond Feng <en...@gmail.com>.
Good catch. The latest spec says:
[JCA90004] A method annotated with @Destroy can have any access modifier and
MUST have a void return type and no arguments.
Do you want to open a JIRA and provide a patch? We would like to recognize
and track your contributions :-).
Thanks,
Raymond
--------------------------------------------------
From: "keinmensch" <ke...@mailhaven.com>
Sent: Monday, March 15, 2010 5:06 AM
To: <us...@tuscany.apache.org>
Subject: @Destroy Annotation Bug?
> Hi!
> There seems to be a bug in 2.0M4 preventing the use of @Destroy on
> private and protected methods. If @Destroy is used to annotate a method
> with package visibility, no exception is thrown but the method is never
> called when the component is to be taken out of service.
> According to section 10.8 in Service Component Architecture SCA-J Common
> Annotations and APIs Specification Version 1.1, such a method may have
> any access modifier.
> To correct this, remove lines 62-64 in the class
> org.apache.tuscany.sca.implementation.java.introspect.impl.DestroyProcessor
> in the module implementation-java. Additional modifications required?
> Best wishes!
> Ivan
>