[jboss-jira] [JBoss JIRA] (WFLY-13515) Application does not fail when @Singleton @PostConstruct throws exception

Cheng Fang (Jira) issues at jboss.org
Mon May 25 21:47:21 EDT 2020


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

Cheng Fang updated WFLY-13515:
------------------------------
    Affects Version/s: 20.0.0.Beta1
                       19.0.0.Final


> Application does not fail when @Singleton @PostConstruct throws exception
> -------------------------------------------------------------------------
>
>                 Key: WFLY-13515
>                 URL: https://issues.redhat.com/browse/WFLY-13515
>             Project: WildFly
>          Issue Type: Bug
>          Components: EJB
>    Affects Versions: 19.0.0.Final, 20.0.0.Beta1
>            Reporter: Cheng Fang
>            Assignee: Panagiotis Sotiropoulos
>            Priority: Major
>              Labels: Regression
>         Attachments: helloWorld.ear
>
>
> In EAP 6.4 , sub deployments were accessible before all Singleton's PostConstruct were finished, this was fixed via [1].  After this fix if an exception was thrown from PostConstruct, then the whole deployment was in a failed state as well.  EAP 7.0 works the same as EAP 6.4 after the fix.
> In EAP 7.3/7.2/7.1 when the Singleton throws an exception, the sub deployments are accessible.
> [1] https://bugzilla.redhat.com/show_bug.cgi?id=1310908
> EJB 3.1 spec, section 4.8.1:
> {quote}
> If the Startup annotation appears on the Singleton bean class or if the Singleton has been designated via the deployment descriptor as requiring eager initialization, the container must initialize the Singleton bean instance during the application startup sequence. The container must initialize all such startup-time Singletons before any external client requests (that is, client requests originating outside of the application) are delivered to any enterprise bean components in the application.
> {quote}



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list