aspose file tools*
The moose likes Java in General and the fly likes How i can ensure that a timer (java.util.Timer) is canceld ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How i can ensure that a timer (java.util.Timer) is canceld ?" Watch "How i can ensure that a timer (java.util.Timer) is canceld ?" New topic
Author

How i can ensure that a timer (java.util.Timer) is canceld ?

raminaa niilian
Ranch Hand

Joined: Jul 14, 2005
Posts: 550
Hi
Thank you for reading my post
How i can ensure that a Timer is canceled ?
When i try to cancel my timer it raise an Exception and say that it is already canceled and i find no method to show me the Timer State
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18103
    
  39

Are you sure? Both the Timer and TimerTask class allows you to call the cancel() method repeatedly. The subsequent calls are not supposed to have any affect.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How i can ensure that a timer (java.util.Timer) is canceld ?
 
Similar Threads
Closing Timer on program end
Timer IllegalStateException
Timers
How can i get my refund from prometric.com
How to avoid IllegalStateExceotion in Timer