Subject Re: java 1.5: Slow connection to Database
Author nagypapi
I haven't tried the patch for jaybird, but I tried
InetAddress.getByName() in my own new Socket() code, and it didn't help.
I'll take a look at what workaround does work for me

--- In, Steven Jardine <steve@m...> wrote:
> >Because of this bug:
> >
> >
> >the 1.5 release of java runtime takes 4-5 seconds to connect to the
> >database.
> >I am looking for a workaround in java (not editing the hosts file or
> >something else), that can be compiled under 1.4 and doesn't have this
> >waiting problem if run under 1.5
> >
> >
> It looks like changing the socket constructor to: new
> Socket(InetAddress.getByName(dbai.getServer()), dbai.getPort()); should
> fix the problem. The InetAddress.getByName call disables any reverse
> DNS lookup.
> Would you let me know if this fixes the problem? I couldn't reproduce
> the problem on my machine.
> Steve