Subject | Re: java 1.5: Slow connection to Database |
---|---|
Author | nagypapi |
Post date | 2005-06-17T08:34:49Z |
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
John
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
John
--- In Firebird-Java@yahoogroups.com, Steven Jardine <steve@m...> wrote:
>
> >Because of this bug:
> >http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5092063
> >
> >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