Hi, Rakesh, have you found a solution to your problem? I have a simular application and need to do some preprocessing (cleanup) before shutdown.
Please answer if you found a solution.
The solution is to use JBoss MBeans. When you build this JBoss MBeans and deploy it. During the JBoss Shutdown, these MBeans will be undeployed and at this time you can do your cleanup before undeploying.
For his you need to read about JBoss MBeans. Here is the Link from where you can get started.