5 Replies Latest reply on Jan 26, 2010 6:43 AM by daniel nitzan

    Shutdown hook issue

    daniel nitzan Newbie

      Hi,

      I am running a spring based application in Jboss web container.

      I use the system property -Djboss.shutdown.forceHalt=false.

      I registered a jvm shutdown hook in one of my bean's init method using Runtime.addShutdownHook.

      This shutdown hook runs indeed when I stop the server, but I found out that if I halt the hook's execution, like

      by putting a breakpoint in it, eventually the jvm terminates, although I defined the system property above. (JVM should wait for all shutdown hooks to complete).

       

      Any explanation for this paranormal behaviour?

       

      Thanks

       

      Daniel.