2 Replies Latest reply on Mar 4, 2008 6:41 AM by Dimitris Andreadis

    Shutdown behavior

    Frank Henry Novice

      Hi!

      Is there a way to alter the default shutdown behavior?

      To be more exact, I have multiple MBeans and State*Beans (supplying web services) that might need to run longer then the shutdown mechanism allows.

      If that is not possible (crazy idea coming), might it be possible to create an interceptor that catches the system call, notifies the listeners and when they report back that I can shut down, then requests a server shutdown?

      I looked through the docs, faqs and xmls but could not find anything clearly indicating such a possibility.

      Thanks in advance.

        • 1. Re: Shutdown behavior
          Frank Henry Novice

          Bump.

          Maybe some of the techies can help me out.
          Is there any way to set the minimum time for a shutdown?

          While I presume ultimately the JVM will define when the system goes down, I have noticed that I will (sometimes) actually wait a little longer then usual.
          Is there any way to force such a behavior?

          Again, thanks.

          • 2. Re: Shutdown behavior
            Dimitris Andreadis Master

            I suppose if one of your MBean services "holds" the shutdown thread, while other threads of yours do the extra cleaning-up, maybe that would work.

            You'd also have to put your mbean stop code early in the shutdown sequence. Maybe if you use a BarrierController catching the server stop notification, and your mbean depending on it.