dcsimg
sun.net.inetaddr.ttl=0 setting
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   sunil_peenikal
Posted On:   Monday, January 26, 2004 08:02 AM

I have a application , where I set the sytem property sun.net.inetaddr.ttl=0 so that the DNS name service do not get cached , and I get a name resolution from the 3DNS server. But even after setting the property above , i think the name service is chached in the JVM and I get a connection exception when one of the server is taken down that my application is talking to at, I get this error till I stop and start my application After establishing a connection I send a soap request. below is the code System.err.println("[OOSConnector] : Before trying for connection"); connection = new URL(sendURL).openConnection(); System.err.println("[OOSConnector] : After trying for connec   More>>

I have a application , where I set the sytem property sun.net.inetaddr.ttl=0 so that the DNS name service do not get cached , and I get a name resolution from the 3DNS server.
But even after setting the property above , i think the name service is chached in the JVM and I get a connection exception when one of the server is taken down that my application is talking to at, I get this error till I stop and start my application

After establishing a connection I send a soap request.

below is the code


System.err.println("[OOSConnector] : Before trying for connection");

connection = new URL(sendURL).openConnection();

System.err.println("[OOSConnector] : After trying for connection");

if(connection instanceof HttpURLConnection) {

((HttpURLConnection)connection).setDoOutput(true);

((HttpURLConnection)connection).setDoInput(true);

((HttpURLConnection)connection).setRequestMethod("POST");

((HttpURLConnection)connection).setRequestProperty("SOAPAction","bac");

   <<Less

Re: sun.net.inetaddr.ttl=0 setting

Posted By:   Christopher_Koenigsberg  
Posted On:   Tuesday, January 27, 2004 07:03 AM

Is the server, that goes down, just a DNS server? Or is it actually a server that you have an open TCP connection to? In the second case, I don't think DNS TTL has anything to do with it? In the first case, I think you would get a DNS resolver error?

About | Sitemap | Contact