Subject | Re: [Firebird-Java] Is it possible to reconnect after a network outage? |
---|---|
Author | Roman Rokytskyy |
Post date | 2008-03-26T20:06:01Z |
> I am using a FirebirdConnection object and I get an exception withNo, the reconnect is not and won't be supported.
> ISC_NETWORK_ERROR (335544721) when there is a network issue. Is there
> anything I can do to get that FirebirdConnection object functional
> again when the db machine comes back online, or do I have to recreate
> another FirebirdConnection object and connect the new object?
The network error in most cases means that socket was broken. This in
turn means that the transaction that experienced the issue was already
marked for rollback. Also all statement handles are lost at this time.
Providing reconnect() method would mean that driver would need to
re-prepare all open statements, re-execute queries and re-position the
cursors on the right places to make it usable for all applications. Too
complicated, is not required by the specification and can be much more
easily handled on the application level.
Roman