2

When I deploy my JEE6 application on JBoss EAP 6.3 and shutdown the server before manually undeploying the application I get unexpected Exceptions (see below).

I'm looking for a way to make shutdown work or a reliable source that states that it does not work and won't be fixed.

Yet the shutdown of the application works fine, if done manually (delete the .ear from deployment directory, wait for undeploy, then shutdown JB). No exceptions occur and everything works as expected.

So, I assume there is a way to configure JBoss in a way that does that automatically on server shutdown, send stop signal to the applications, wait until they are gone or timeout is reached, then shutdown the server.

I shutdown JBoss 7 with this command:

jboss-cli.bat --connect --command=:shutdown --timeout=30000 --controller=127.0.0.1:9999

The exceptions I get (e.G. JBAS0141134) make me think that JBoss is removing Beans and Resources that my application depends on before the shutdown sequence is complete.

I control my shutdown process inside a @PreDestroy inside an @Singleton that calls some @Stateless beans that in turn have the database resources, etc.

The most prominent exception I get:

ERROR - JBAS014134: 
   EJB-Aufruf an Komponente MyStatelessBean
      für Methode public abstract void MyStatelessLocal.performShutdownOperation() fehlgeschlagen:
   javax.ejb.EJBAccessException: JBAS014502: 
   Aufruf an Methode: public abstract void MyStatelessLocal.performShutdownOperation() 
      von Bean: MyStatelessBean ist nicht gestattet

(Indentation is mine)

Keep in mind that even though it says "call is not permitted", the call works fine if I undeploy the application, without shutting down the server.

Angelo Fuchs
  • 197
  • 1
  • 13
  • I'm pretty sure the :shutdown command will (try to) undeploy apps. I've seen some apps take more than 30 seconds for things to time out before they shutdown, maybe worth trying without the timeout parameter? When you use the :shutdown script, do you see messages in the server.log saying the applications have been undeployed (or at least attempted)? When you stop the apps manually, don'to you use a specific order that might be significant? – Paul Walker Jan 04 '16 at 06:52
  • @PaulWalker The problem is that the JBoss removes access to resources at the same time. The shutdown of the applications then breaks. I do not have the impression that the timeout value does anything at all, to be honest. – Angelo Fuchs Jan 06 '16 at 11:25

0 Answers0