1 Reply Latest reply on Jan 25, 2011 2:30 AM by wdfink

    JVM shudown behavior

    rakcheru

      Greetings,

       

      (JBoss version : 4.2.3)

       

      For the past few days i am stuck with finding any documentation for JVM shutdown behavior for JBoss. I am trying to understand whether the "shutdown.sh" will allow any user threads (non-daemon threads) to complete before shutting down JVM.

       

      From the findings looks like JVM shutdown terminates non-daemon threads and does NOT wait for them to complete. Is this behavior configurable ? Can anybody please clarify this or point me to any documentation ?

       

      Thanks much in advance,

      Rakesh

        • 1. JVM shudown behavior
          wdfink

          The shutdown.sh script try to bring the server controlled out of work, e.g. remove from cluster, finish all transactions and so on.

          The script sends only a request to JBoss core that the server should be stopped (can also be done by kill -1).

           

          The script does not work in different circumstances (e.g. massive GC).

          If you want to stop the JVM immediately you might use 'kill -9' but this may affect db connections.