Sorry, I wasn't very clear. I have a Struts application. My heartbeat thread that checks the other server, is spawned from the init method of the controller servlet, so bouncing tomcat restarts the heartbeat thread.
My issue is, once the heartbeat program gets an UnknownHostException , for some reason. The heartbeat program keeps thinking there is a UnknownHostException until it is restarted (by bouncing Tomcat), just like it was cached somewhere. I was thinking that getting the URL object every time though the loop may solve this..... I'm not sure what else would cause it. The DNS issue clears up , but the heartbeat still thinks there is an exception. -----Original Message----- From: Hannes Schmidt [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 8:02 PM To: Tomcat Users List Subject: Re: crontab problems I attached a version of my sample code that actually works (JDK used 1.4.1). Regarding your problem: I don't understand why bouncing Tomcat would resolve a DNS problem. The UnknownHostException is a indication that something is wrong with DNS or the resolver library. ----- Original Message ----- From: "Ron Day" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Wednesday, February 26, 2003 1:37 AM Subject: RE: crontab problems > I have code very similar to this that does work............... except > whenever I get an unknowHostException, it seems to be cached somewhere until > I bounce Tomcat. My code actually pulses another website (in a thread every > 3 minutes)that is on the network, rather than check Tomcat. In place of your > streams, I actually set the request method to "HEAD", and interrogate the > Response Code. This is easy to do in HTTPURLConnection. > > I instantiate the URL outside the loop (and hence only once), and I am > wondering if this is the source of my problem. I plan to test it ASAP. > > ron > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
