N
Nishi Bhonsle
Hi:
I have a servlet application deployed in OC4J. One of the page of the application takes the value for a smtpServer entered by the user from the client(value is a string), checks whether the value is valid in the following backend code --
try
{
//if you can open a socket on the smtp host at port 25, then it is a valid smtp host
Socket smtpSocket = new smtpSocket("smtpServerVal", 25);
....
....
}
catch(UnknownHostException uhe)
{
...
.....
}
catch(IOException ioe)
{
....
....
}
where smtpServerVal is the value entered through the client UI(browser).
I noticed that when I pass
Socket smtpSocket = new smtpSocket("yahoo", 25);
I get the UnknownHostException immediately(response is quick) and the page returns.
But when I pass
Socket smtpSocket = new smtpSocket("yahoo.com", 25);
The response of IOException takes a rather long time.. i.e. the page takes almost after 30 secs or more to return.
I observe this slower response only when the backend code is run on a solaris 8 machine, not on windows XP or 2000.
Is this a known issue? How can I resolve this if any?
Thanks, Nishi.
I have a servlet application deployed in OC4J. One of the page of the application takes the value for a smtpServer entered by the user from the client(value is a string), checks whether the value is valid in the following backend code --
try
{
//if you can open a socket on the smtp host at port 25, then it is a valid smtp host
Socket smtpSocket = new smtpSocket("smtpServerVal", 25);
....
....
}
catch(UnknownHostException uhe)
{
...
.....
}
catch(IOException ioe)
{
....
....
}
where smtpServerVal is the value entered through the client UI(browser).
I noticed that when I pass
Socket smtpSocket = new smtpSocket("yahoo", 25);
I get the UnknownHostException immediately(response is quick) and the page returns.
But when I pass
Socket smtpSocket = new smtpSocket("yahoo.com", 25);
The response of IOException takes a rather long time.. i.e. the page takes almost after 30 secs or more to return.
I observe this slower response only when the backend code is run on a solaris 8 machine, not on windows XP or 2000.
Is this a known issue? How can I resolve this if any?
Thanks, Nishi.