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] [Created] (OPENEJB-1554) PostConstruct callback should be allowed in stateful session bean.
Date Thu, 19 May 2011 14:44:47 GMT
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


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