wouldn't be a memory leak issue would it?

-----Original Message-----
From: David kerber [mailto:[EMAIL PROTECTED]
Sent: Friday, June 29, 2007 9:41 AM
To: Tomcat Users List
Subject: Trouble with java.util.Timer in Tomcat 5.5


I have an app running in Tomcat 5.5.12, with jre  1.5.0_12 (explicitly 
specified in the service configuration), on windows 2000 server.

I have one class that is initialized by a servletContextListener, in the 
contextInitialized event.  This class uses java.util.Timer and 
java.util.TimerTask to check every few minutes for new files on an ftp 
site, and if it finds any, it downloads and processes them.  This all 
works fine for anywhere from 2 or 3 days to a week or so, then the timer 
just stops firing, and indicated by a sudden lack of entries in the log 
file (I log every time the timer fires to help track down this problem).

Over the last couple of weeks, I've found some things that can cause 
this, but I believe I've fixed them, but my timer still stops firing 
after a few days.  The things I've already fixed were updating the jre 
to 1.5.12, because of problems with automatic time correction on the 
server, and I found that unhandled exceptions in the timer task can also 
cause this, so early last week I modified my code to trap all exceptions 
before they can trickle up to the timer, and log them, and I don't see 
any exceptions being logged.

It doesn't seem to be related to the number of executions, because the 
latest time it stopped on me, it had fired around 1200 times, and the 
time before that was around 4500 times.  It can also be any time of day, 
and sometimes the server is busy and other times it hasn't had a 
connection for several hours.

Any other suggestions as to what I should look for to find this? 

Thanks!
D



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to