0 Replies Latest reply on Mar 26, 2019 1:33 PM by simix

    JSR-345 mismatch - @PreDestroy order for beans with @StartUp @Singleton

    simix

      Hello.

      Is it possible to achieve destroy order for @Singleton and @Startup beans ?

      First bean make long running task, second bean @DependsOn it. Hovewer, during container shutdown second bean destroy first and close resources, causing first bean fall to error.

       

      Wildfly 11.0.0

       

      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.