Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1322

@PostConstruct not executed in superclass since 2.0.0.Beta1

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Rejected
    • Affects Version/s: 2.0.0.Beta1, 2.0.0.Beta2, 2.0.0.Beta3
    • Fix Version/s: 2.0.0.Beta4
    • Component/s: None
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      Create the classes as described below, choose the correct dependency and execute

      Show
      Create the classes as described below, choose the correct dependency and execute

      Description

      Let's take the class hierarchy below:

      @Singleton
      public class Y extends X {
      public Y()

      { super(); }
      }

      public abstract class X {
      public X() { super(); }

      @PostConstruct
      public void init() throws Exception

      { ...(logging)... }

      }

      public class Main {
      public static void main(String[] args) throws Exception

      { WeldContainer weld = new Weld().initialize(); weld.instance().select(Y.class).get(); }

      }

      When I execute this kind of code using org.jboss.weld.se.weld-se:2.0.0.Alpha3 I get all I was expecting to get (@PostConstruct method in X is executed).
      However, when I execute the same code using org.jboss.weld.se.weld-se:2.0.0.Beta1 or above, the @PostConstruct method in X is never executed (nothing logged).

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mkouba Martin Kouba
                  Reporter:
                  thomas.penne Thomas Penne
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: