1 Reply Latest reply on Nov 8, 2014 12:00 AM by jaikiran pai

    jboss shutdown hook

    ravi katkar Newbie

      HI,

       

      i want to intercept the jboss shut down os that i can clean up my resources , when ever user issue shutdown i want to free up my resource before actual jboss shut down triggers,

      i tried with Runtime.getRuntime().addShutdownHook(this.shutdownHook);

      but i observe that my resource clean up and the jboss shut down goes in separate thread , this is leading to un proper clean of my resources.

       

      is there any way i can ensure i clean up my resources first and than joss shut down begins when user signal for shut down  .

       

      thanks,
      Ravi Katkar