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

@PostConstruct not executed in superclass since 2.0.0.Beta1

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • 2.0.0.Beta4
    • 2.0.0.Beta1, 2.0.0.Beta2, 2.0.0.Beta3
    • None
    • None
    • 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).

      Attachments

        Issue Links

          Activity

            People

              mkouba@redhat.com Martin Kouba
              thomas.penne Thomas Penne (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: