Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-10261

@Startup, @WebListener and (@Observes @Initialized(ApplicationScoped.class) are triggered before some components has started

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • 12.0.0.Final
    • CDI / Weld
    • None

      We are migrating our applications from Wildfly 10 to Wildfly 12 and sometimes Wildfly 12 trigger @Startup (with @PostContruct) or @WebListener or (@Observes @Initialized(ApplicationScoped.class) before some components has started.

      Ex:

      • At these moments we can't inject remote EJBs (simple new InitialContext().lookup(jndi))
      • Sometimes these @Observes is fired with null parameter
        public void observesContext(@Observes @Initialized(ApplicationScoped.class) ServletContext context){
        	this.context = context;
        }
        

      These behavior olny occurs when the server is starting with the application deployed.
      When the application is deployed after the server is up and running, all goes fine a work.

              bstansbe@redhat.com Brian Stansberry
              dbdbdb_jira Daniel Fb (Inactive)
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: