tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shawn Jiang (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OPENEJB-1554) PostConstruct callback should be allowed in stateful session bean.
Date Thu, 19 May 2011 15:02:47 GMT

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

Shawn Jiang updated OPENEJB-1554:
---------------------------------

    Attachment: 0001-OPENEJB-1554-PostConstruct-callback-should-be-allowe.patch

post construct should be allowed in stateful session bean per.

ejb31 spec 4.3.10

> PostConstruct callback should be allowed in stateful session bean.
> ------------------------------------------------------------------
>
>                 Key: OPENEJB-1554
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1554
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: ejb31
>    Affects Versions: (trunk/openejb3)
>            Reporter: Shawn Jiang
>         Attachments: 0001-OPENEJB-1554-PostConstruct-callback-should-be-allowe.patch
>
>
> In current trunk call back check code:
> org.apache.openejb.config.rules.CheckCallbacks.checkCallback(Class<?>, String,
CallbackMethod, EnterpriseBean, Class...)
> {
> ....
>                     if (sb.getSessionType().equals(SessionType.STATELESS)) {
>                        if (!callback.getMethodName().equals("ejbCreate")) {
>                             fail(bean.getEjbName(), "callback.sessionbean.invalidusage",
type, callback.getMethodName(), ejbClass);
>                         }
>                     } else {
>                          fail(bean.getEjbName(), "callback.sessionbean.invalidusage",
type, callback.getMethodName(), ejbClass);
>                      }
> ...
> }
> so that when a post construct callback is used in statefull session bean.  openejb will
throw validate failure exception.

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

Mime
View raw message