You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Ivan (JIRA)" <ji...@apache.org> on 2011/05/11 16:55:47 UTC
[jira] [Resolved] (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 ]
Ivan resolved OPENEJB-1548.
---------------------------
Resolution: Fixed
Commit changes to trunk at rev.r1101906. Thanks, Shawn.
> "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
>
> Attachments: 0001-Use-declaring-class-instead-of-whole-EJB-class-for-c.patch
>
>
> 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