2 Replies Latest reply on Feb 20, 2016 1:47 AM by dfilippov

    Invocation cannot proceed as component is shutting down

    dfilippov

      Hello!

      In my app, I have HttpSessionListener, which calls SLSB's method in sessionDestroyed. Something like

      @WebListener
      public class UserSessionListener implements HttpSessionListener {
          @EJB
          private FooSB foo;
      
      
          @Override
          public void sessionCreated(HttpSessionEvent httpSessionEvent) {
          }
      
      
          @Override
          public void sessionDestroyed(HttpSessionEvent httpSessionEvent) {
              ...
              foo.bar();
              ...
          }
      }
      
      
      

      On shutdown, server (wildfly 9.0.2.Final) throws org.jboss.as.ejb3.component.EJBComponentUnavailableException with message "WFLYEJB0421: Invocation cannot proceed as component is shutting down".

      Is there any way to denote components shutdown order to get rid of this error?