[jboss-jira] [JBoss JIRA] (WFCORE-4588) @PreDestroy order violation JSR-345

Igor Dmitriev (Jira) issues at jboss.org
Wed Jul 31 09:45:00 EDT 2019


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

Igor Dmitriev updated WFCORE-4588:
----------------------------------
    Description: 
Wildlfy 11.0.0
Bean X with @Startup and @Singleton annotations make long running task, Y bean (also with @Startup and @Singleton) @DependsOn bean X. Hovewer, during container shutdown (Ctrl+C) bean X is destroying first and closing resources, causing bean Y fall to error.

Expected behavior:
JSR-345: The container ensures that all singleton session beans with which a singleton session bean has a DependsOn relationship are still available during the PreDestroy callback.
So, bean Y must be destroyed first, then bean X.

  was:
Bean X with @Startup and @Singleton annotations make long running task, Y bean (also with @Startup and @Singleton) @DependsOn bean X. Hovewer, during container shutdown (Ctrl+C) bean X is destroying first and closing resources, causing bean Y fall to error.

Expected behavior:
JSR-345: The container ensures that all singleton session beans with which a singleton session bean has a DependsOn relationship are still available during the PreDestroy callback.
So, bean Y must be destroyed first, then bean X.



> @PreDestroy order violation JSR-345
> -----------------------------------
>
>                 Key: WFCORE-4588
>                 URL: https://issues.jboss.org/browse/WFCORE-4588
>             Project: WildFly Core
>          Issue Type: Bug
>          Components: Server
>         Environment: Windows 7 Pro, java 8
>            Reporter: Igor Dmitriev
>            Assignee: Jeff Mesnil
>            Priority: Major
>
> Wildlfy 11.0.0
> Bean X with @Startup and @Singleton annotations make long running task, Y bean (also with @Startup and @Singleton) @DependsOn bean X. Hovewer, during container shutdown (Ctrl+C) bean X is destroying first and closing resources, causing bean Y fall to error.
> Expected behavior:
> JSR-345: The container ensures that all singleton session beans with which a singleton session bean has a DependsOn relationship are still available during the PreDestroy callback.
> So, bean Y must be destroyed first, then bean X.



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


More information about the jboss-jira mailing list