Java 1.3 java.util.Timer - issue!

Discussion in 'Java' started by amy j, Oct 13, 2004.

  1. amy j

    amy j Guest

    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.
     
    amy j, Oct 13, 2004
    #1
    1. Advertising

  2. Andrew Thompson, Oct 13, 2004
    #2
    1. Advertising

  3. amy j

    Alex Hunsley Guest

    amy j wrote:
    > 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
     
    Alex Hunsley, Oct 13, 2004
    #3
  4. "amy j" <> wrote in message
    news:...
    > 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?
     
    Mike Schilling, Oct 13, 2004
    #4
  5. amy j

    Alex Hunsley Guest

    amy j wrote:
    > 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
     
    Alex Hunsley, Oct 13, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Glick

    Naming java.util.Timer thread

    Brian Glick, Jul 30, 2003, in forum: Java
    Replies:
    1
    Views:
    630
    Gordon Beaton
    Jul 30, 2003
  2. FET
    Replies:
    3
    Views:
    484
    Chris Smith
    Sep 24, 2004
  3. Daisy
    Replies:
    3
    Views:
    4,072
    Steve Horsley
    Sep 12, 2005
  4. Replies:
    3
    Views:
    448
    Wesley Hall
    Dec 1, 2006
  5. Replies:
    8
    Views:
    513
    Jorgen Grahn
    Jul 15, 2013
Loading...

Share This Page