So just to be sure we are on the same page here:
Under Seam 1.x
Valid:
@Remove @Destroy
public void destroy() {}
Invalid:
@Remove
public void destroy() {}
@Destroy
public void destroy() {}
Under Seam 2.x
Valid:
@Remove @Destroy
public void destroy() {}
@Remove
public void destroy() {}
Invalid:
@Destroy
public void destroy() {}
or is just having a @Destroy ok ?
/max
On 31 Oct 2008, at 12:18, Max Rydahl Andersen wrote:
>> We changed the rule, probably post SF.
>>
>> If you have a single method marked @Remove, it is assumed it is the
>> @Remove @Destroy method.
>
> ok, so both the validation and docs are incorrect ?
Yup, looks like the Seam 2 docs are wrong regarding this.
>
>
> Maybe the validation is correct for Seam 1.x projects and
> only wrong for Seam 2 ?
Can't remember when Gavin changed this. But it looks that way for me.
>
>
> /max
>
>> On 31 Oct 2008, at 11:56, Max Rydahl Andersen wrote:
>>
>>> Hi,
>>>
>>> In Tools we implemented long ago a validation based on docs and what
>>> you guys told us in SF:
>>>
>>>
https://jira.jboss.org/jira/browse/JBIDE-554
>>> "All stateful session bean Seam components must have a method marked
>>> @Remove @Destroy to ensure that Seam will remove the stateful bean
>>> when the Seam context ends, and clean up any server-side state."
>>>
>>> Recently we created the Project Example wizard and we wanted to use
>>> the booking example as an example.
>>> I was surprised to find that our validator complained about the code
>>> because in there all @Stateful beans get the Error:
>>>
>>> "Stateful component "<takeyourpick>List" must have a
method marked
>>> @Destroy
>>>
>>> and that is true since the code looks like this:
>>>
>>> @Remove
>>> public void destroy() {}
>>>
>>> where it should be:
>>>
>>> @Remove @Destroy
>>> public void destroy() {}
>>>
>>> My question now is:
>>>
>>> Is that validation rule broken (and the docs are wrong) or is the
>>> booking example broken ?
>>>
>>> Thanks,
>>> --/max
>>> _______________________________________________
>>> seam-dev mailing list
>>> seam-dev(a)lists.jboss.org
>>>
https://lists.jboss.org/mailman/listinfo/seam-dev
>>
>
>
>
> --/max