Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-2785

Do not call @PostConstruct multiple times on @Startup @Singleton bean.

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.0.2.Final, 7.1.0.Beta1
    • Fix Version/s: 7.1.0.Final
    • Component/s: EJB
    • Labels:
      None

      Description

      Given an @Startup @Singleton bean with a @PostConstruct method called Controller; when the Controller's dependencies are satisfied then its @PostConstruct method is called.

      Given another @Startup @Singleton bean with a @PostConstruct method called Client that has an @EJB injection of the Controller; when the Client's dependencies are satisfied then the @PostConstruct method of both the Controller and Client are called.

      This is true for each Client instance. So if there are N Client instances, there will be N+1 invocations of Controller's @PostConstruct.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  swd847 Stuart Douglas
                  Reporter:
                  daniel_spasojevic Dan Spasojevic
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  10 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: