Uploaded image for project: 'OpenEJB'
  1. OpenEJB
  2. OPENEJB-1554

PostConstruct callback should be allowed in stateful session bean.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.7.0
    • 4.0
    • ejb31
    • None

    Description

      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.

      Attachments

        Activity

          People

            genspring Lin Quan Jiang
            genspring Lin Quan Jiang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: