glassfish
  1. glassfish
  2. GLASSFISH-15146

InjectionManager.inject doesn't handle PostConstruct methods properly

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.0
    • Fix Version/s: 4.1
    • Component/s: naming
    • Labels:
      None

      Description

      The InjectionManagerImpl.inject method takes a boolean that controls whether postConstruct
      methods are called. Fortunately, most of the time it's called with "false". I think the
      only time it's called with "true" is when injecting an app client main class.

      If called with true, the PostConstruct invocation logic ignores method overriding and may call
      PostConstruct methods that shouldn't be called, or may call the same method more than once.

        Activity

        Bill Shannon created issue -
        Hong Zhang made changes -
        Field Original Value New Value
        Assignee Hong Zhang [ hzhang_jn ] Tim Quinn [ tjquinn ]
        Affects Version/s 3.2 [ 10969 ]
        Affects Version/s V3 [ 10981 ]
        Jill Sato made changes -
        Affects Version/s 4.0 [ 10970 ]
        Affects Version/s 3.2 [ 10969 ]
        Tim Quinn made changes -
        Assignee Tim Quinn [ tjquinn ] Hong Zhang [ hzhang_jn ]
        Hong Zhang made changes -
        Assignee Hong Zhang [ hzhang_jn ] guojun.shan [ guojun.shan ]
        Component/s naming [ 10636 ]
        Component/s deployment [ 10594 ]
        guojun.shan made changes -
        Fix Version/s 4.0.1 [ 16061 ]
        Romain Grécourt made changes -
        Fix Version/s 4.1 [ 16387 ]
        Fix Version/s 4.0.1 [ 16061 ]

          People

          • Assignee:
            guojun.shan
            Reporter:
            Bill Shannon
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: