Java 1.3 java.util.Timer - issue!

A

amy j

I'm scheduling one-time timer tasks, and occasionally the scheduled
task never executes. I am running Java 1.3 on the server and using
java.util.Timer and java.util.TimerTask. Does ANYONE know why this
might be happening?
Does anyone know of a bug in 1.3 or had this issue before? Any
Suggestions for a cure.
 
A

Alex Hunsley

amy said:
I'm scheduling one-time timer tasks, and occasionally the scheduled
task never executes. I am running Java 1.3 on the server and using
java.util.Timer and java.util.TimerTask. Does ANYONE know why this
might be happening?
Does anyone know of a bug in 1.3 or had this issue before? Any
Suggestions for a cure.

Not heard of anything. Can you post any code?
e.g. the code that sets up the task, and the code that actually gets
exectued. Gives us more of a chance to look for something going wrong.

alex
 
M

Mike Schilling

amy j said:
I'm scheduling one-time timer tasks, and occasionally the scheduled
task never executes. I am running Java 1.3 on the server and using
java.util.Timer and java.util.TimerTask. Does ANYONE know why this
might be happening?
Does anyone know of a bug in 1.3 or had this issue before? Any
Suggestions for a cure.

If any of the tasks throw an exception, the timer thread will exit. Could
this be what's happening?
 
A

Alex Hunsley

amy said:
I'm scheduling one-time timer tasks, and occasionally the scheduled
task never executes. I am running Java 1.3 on the server and using
java.util.Timer and java.util.TimerTask. Does ANYONE know why this
might be happening?
Does anyone know of a bug in 1.3 or had this issue before? Any
Suggestions for a cure.

Here's a thought: TimerTask only uses one thread to run stuff. So if one
task you are running takes too long, the next scheduled task won't start
till the run() method of the one still running exits. Could it be that?

alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,244
Latest member
cryptotaxsoftware12

Latest Threads

Top