Subject Re: [Firebird-Java] Re: socket timeout
Author Mark Rotteveel
On Mon, 29 Oct 2012 09:20:38 -0000, "hugo.larson" <hugo.larson@...>
wrote:
> I'm trying to reduce the timeout time when i connect to a database and
the
> database is down, or the server its on is down.
> Right now it take more than 10 seconds for an exception to be thrown
which
> make my GUI unresponsive.
>
> Roman suggested:
> http://tech.groups.yahoo.com/group/Firebird-Java/message/10603
>
> But it does not work for me.
> I'm using Firebird 1.5.3 with Jbuilder and jaybird 2.1.6

The so_timeout specifies the amount of time that a read() call on the
socket will block. This is to detect lost connections that weren't
explicitly reset or disconnected, or just to limit the amount of time that
a read() call will block. See the description on Socket.setSoTimeout()
http://docs.oracle.com/javase/7/docs/api/java/net/Socket.html#setSoTimeout(int)

The problem you are referring to is the connect timeout, you can't
currently control that in Jaybird (maybe there is a standard Java system
property for that, but I can't find it right now, I'll see if I can find it
tonight).

Mark