0

I have scenario where I am scheduling task at fixed duration repetitively.Fixed delay is generated by calling start method of another class that implements runnable interface using Thread.sleep(long ms ) method. But when I test this application in my local pc it is working.But when I run this application in ibm blade server(64 bit) having OS(Windows server 2008 R2) it do not work as desired. It do not come out of sleep method.

Kindly suggest the solution?

Thank You in Advance.

user1582791
  • 11
  • 1
  • 2
  • There has been an issue with Thread.sleep hanging related to the leap second. http://stackoverflow.com/questions/6749159/thread-sleep-is-hung – Marko Topolnik Nov 09 '12 at 13:13

1 Answers1

0

There is not much information in your question to see what the problem is. Thread.sleep should either return or throw an exception. Maybe something different is happening. For example, an exception has occurred, caught and forgotten, or you have a deadlock somewhere. Anyway, different versions of Java sometimes have subtle differences causing bugs. You will have to investigate the problem yourself.

  • Try debugging the application. When it hangs, press Pause and examine all threads to find the hanging one.
  • If you can't install a debugger on the server, add System.out.println in every reasonable place of the code; reading the output in the console, you will probably be able to track down the issue.
  • If you can't launch the application with console, create a text file and write the messages to it. Don't forget to flush it every time.
Goblin Alchemist
  • 829
  • 5
  • 11