Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-1937

@PostConstruct methods on Multiple default inceptors are not all called

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • None
    • None

      It is clearly stated in the EJB 3.0 spec that there can be multiple default interceptors specified for a single ejb-jar. (Section 12.8.2.1) . It is also written there that the inceptor methods are invoked in that order (as in the ejb-jar.xml) (section 12.4.1: Multiple Callback Interceptor Methods for a Life Cycle Callback Event) ["Default interceptors are invoked in the order of their specification in the deployment descriptor"] which means there can be multiple default interceptors with callback for the same life-cycle event.

      Now in JBoss, if multiple default interceptors are specified and all of them have @PostConstruct specified (regardless of whether annotation or deployment descriptor is used), only the first one specified in ejb-jar.xml is called and the rest are ignored (not invoked). The problem also persisted in JBoss 5.0.1 GA.

      However, the @AroundInvoke methods work just fine (All of them are called in proper order)

              jaikiran Jaikiran Pai (Inactive)
              debasish.raychawdhuri_jira Debasish Ray Chawdhuri (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: