1

I am using Eclipse Virgo Server as my OSGi container and my bundle has a Spring provided ThreadPoolTaskExecutor. When I run the server shutDown.bat it will throw me an error and hangs up. I do use the threadPoolTaskExecutor.shutDown() in my code. It seems server hangs before it get called.

Can anyone please explain me why this happens? It seems to me I am not handle the threads correctly.

palacsint
  • 28,416
  • 10
  • 82
  • 109
Sam
  • 2,055
  • 6
  • 31
  • 48
  • If you provide the error (stack trace?) we will have a much greater chance of helping you. – forty-two Mar 30 '12 at 09:13
  • 1
    @forty-two - Thank you very much for your turn around.actually i figure out the issue. in my initializing class i used a endless for loop, keep it sleep for 1 min to simulate the folder poling. so when i use 'shutdown.bat' the looping thread will block the other threads from the thread pool and leads to a dead lock situation. so i removed that endless loop part and came up with a idea of use spring scheduling mechanism. once the loop removed i can shut down the pool executors without any issue. appreciate your interest regarding this..Thank you very much. – Sam Mar 30 '12 at 16:38

0 Answers0