• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About timer in java

 
Arun Vasu
Greenhorn
Posts: 24
Android Java MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a requirement to check a web service just after sending a message.

Requirement is like,

1. Send the JMS message to external system.
1.1 They may process it or may not.
2. I need to check the status of the already sent message in 5 seconds after sending it to the external system.

Could anyone tell me what may be be best approach to do it?

Thanks in advance,
Arun
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out java.util.Timer and TimerTask. Or -if there is no rush to finish the current thread- just do a Thread.sleep(5000).
 
Arun Vasu
Greenhorn
Posts: 24
Android Java MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you !
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic