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

PostConstruct callback should be allowed in stateful session bean.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.7.0
    • Fix Version/s: 4.0
    • Component/s: ejb31
    • Labels:
      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

            • Assignee:
              genspring Shawn Jiang
              Reporter:
              genspring Shawn Jiang
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: