This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes About timer in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "About timer in java" Watch "About timer in java" New topic
Author

About timer in java

Arun Vasu
Greenhorn

Joined: Oct 05, 2010
Posts: 24

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
Marshal

Joined: Mar 22, 2005
Posts: 41048
    
  43
Check out java.util.Timer and TimerTask. Or -if there is no rush to finish the current thread- just do a Thread.sleep(5000).


Ping & DNS - my free Android networking tools app
Arun Vasu
Greenhorn

Joined: Oct 05, 2010
Posts: 24

Thank you !
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: About timer in java
 
Similar Threads
how to configure the mail to send mail in server
Big Smokes cigar assignment
request.getParameter == null, even though form post var does exist
Ejb and JMS Interaction
How to justify QoS when integrating with external systems