[jboss-jira] [JBoss JIRA] (WFLY-10879) Deployment is not failing as expected and according to the specification if a @Singleton @Startup @PostConstruct initialization failed

Bartosz Baranowski (JIRA) issues at jboss.org
Tue Sep 11 00:54:00 EDT 2018


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

Bartosz Baranowski reassigned WFLY-10879:
-----------------------------------------

    Assignee: Bartosz Spyrko-Śmietanko  (was: Jason Greene)


> Deployment is not failing as expected and according to the specification if a @Singleton @Startup @PostConstruct initialization failed
> --------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WFLY-10879
>                 URL: https://issues.jboss.org/browse/WFLY-10879
>             Project: WildFly
>          Issue Type: Bug
>          Components: EJB
>            Reporter: Wolf-Dieter Fink
>            Assignee: Bartosz Spyrko-Śmietanko
>         Attachments: server.log
>
>
> According to the spec (see below excerpt of ejb3.2 specification) the application should not avaialble if a Singleton initialization has failed.
> The current behaviour with two ejb.jar's in one ear, or other combinations is
> that the failure is logged, the deployment seems removed (there is a APP.ear.failed marker file) but another EJB of a second jar inside the ear is accesible, also web applications war deployemts are started.
> from the Spec 3.2
> 4.8.1 Singleton Session Bean Initialization
> By default, the container is responsible for deciding when to initialize a singleton session bean instance.
> However, the Bean Provider can optionally configure the singleton session bean for eager initialization.
> If the Startup annotation appears on the singleton session bean class or if the singleton session bean
> has been designated via the deployment descriptor as requiring eager initialization, the container must
> initialize the singleton session bean instance during the application startup sequence. 
> *****  The container must initialize all such startup-time singleton session beans before any external client requests (that is,
> client requests originating outside of the application) are delivered to any enterprise bean components in
> the application. ******
> 4.8.4 Singleton SB error handling
> Errors occurring during singleton session bean initialization are considered fatal and must result in the
> discarding of the singleton session bean instance. ...
> If a singleton session bean fails to initialize, attempted invocations on the singleton session bean result in the
> javax.ejb.NoSuchEJBException exception as defined by Section 3.4.3 and Section 3.4.4 .



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)



More information about the jboss-jira mailing list