You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Shawn Jiang (JIRA)" <ji...@apache.org> on 2011/05/10 10:59:03 UTC

[jira] [Updated] (OPENEJB-1548) "PreDestroy annotation can only be applied to the ejbRemove method" rule should only apply to the very class that implement SessionBean interface.

     [ https://issues.apache.org/jira/browse/OPENEJB-1548?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shawn Jiang updated OPENEJB-1548:
---------------------------------

          Component/s: ejb31
        Fix Version/s: 4.0
    Affects Version/s: (trunk/openejb3)

> "PreDestroy annotation can only be  applied to the  ejbRemove method" rule should only apply to the very class that implement SessionBean interface.
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENEJB-1548
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1548
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: ejb31
>    Affects Versions: (trunk/openejb3)
>            Reporter: Shawn Jiang
>             Fix For: 4.0
>
>
> ejb3.1 spec 4.3.5
> If the session bean implements the SessionBean interface, the PreDestroy annotation can only be 
> applied to the  ejbRemove method; the  PostActivate annotation can only be applied to the 
> ejbActivate method; the PrePassivate annotation can only be applied to the ejbPassivate
> method. Similar requirements apply to use of deployment descriptor metadata as an alternative to the 
> use of annotations.
> But for following cases,  there are two PreDestroy methods.   Both of them should be valid.
> class A {
> @PreDestroy
> public void xxxxx(){
> }
> }
> class B extends A implements SessionBean {
> @PreDestroy
> public void ejbRemove(){
> }
> }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira