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

Reply via email to