[jboss-jira] [JBoss JIRA] (WFLY-10261) @Startup, @WebListener and (@Observes @Initialized(ApplicationScoped.class) are triggered before some components has started

Brian Stansberry (Jira) issues at jboss.org
Fri Jan 25 10:25:00 EST 2019


     [ https://issues.jboss.org/browse/WFLY-10261?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Stansberry reassigned WFLY-10261:
---------------------------------------

    Component/s: CDI / Weld
       Assignee: Brian Stansberry  (was: Jason Greene)


Is this still a problem with WildFly 15? If it is can you provide a reproducer app?

> @Startup, @WebListener and (@Observes @Initialized(ApplicationScoped.class) are triggered before some components has started
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WFLY-10261
>                 URL: https://issues.jboss.org/browse/WFLY-10261
>             Project: WildFly
>          Issue Type: Bug
>          Components: CDI / Weld
>    Affects Versions: 12.0.0.Final
>            Reporter: Daniel Fb
>            Assignee: Brian Stansberry
>            Priority: Major
>
> 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
> {code}
> public void observesContext(@Observes @Initialized(ApplicationScoped.class) ServletContext context){
> 	this.context = context;
> }
> {code}
> *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.



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list