B4J Question B4J app Crashed on unstable network

incendio

Well-Known Member
Licensed User
Longtime User
Hi guys,

I made a simple database app, it worked OK when network connection is stable.

But when network unstable, like disconnect & connect again, operation to remote database, even perform when connection already restored, will make B4J crashed.

I checked the log, here is the error message :

org.firebirdsql.jdbc.FBSQLException: Resource Exception. Error writing data to the connection. [SQLState:08006, ISC error code:335544727]

This is an error from firebird database server, other database might not have error like this.

Is there any viable solution to handle this error?
 

keirS

Well-Known Member
Licensed User
Longtime User
I assume you have your code in a Try Catch block? If so the first thing you should try is to use the ConnectionPool from the server library as this tests a connection before issuing them. See here for a discussion on other tests that can be made.
 
Last edited:
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
I assume you have your code in a Try Catch block? If so the first thing you should try is to use the ConnectionPool from the server library as this tests a connection before issuing them. See here for a discussion on other tests that can be made.
Thanks for your suggestions. I changed it to use connection pool, no checking for valid connection & now is OK.

Using connection pool, when network not restored within allowed time, it will raised exception, and if network restored before timeout, it worked fine.
 
Last edited:
Upvote 0
Top