Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-19440

@Startup @Singleton Beans Constructed Multiple Times

XMLWordPrintable

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

      1) Create a @Singleton @Startup @ApplicationScoped bean
      2) Add logger events to track transit thru constructor/postconstructors methods
      2) Inject or use the bean

      Show
      1) Create a @Singleton @Startup @ApplicationScoped bean 2) Add logger events to track transit thru constructor/postconstructors methods 2) Inject or use the bean

      When using @Startup and/or @Singleton to start a Bean on server startup, everytime a method is accessed or the bean is injected with @EJB, both Constructor and @Postconstruct are executed.

      This happens multiple times, each time any component uses the Singleton bean.

      This seems similar to an issue reported for JBOSS AS 7.x (see forum link reference below)

              psotirop@redhat.com Panagiotis Sotiropoulos (Inactive)
              psotirop@redhat.com Panagiotis Sotiropoulos (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: