0

In Active JDBC, is there a functionality that allows us to set Connection Time Out limit ?

It works like... whenever the user deletes or (insert, update, etc..) a large number of data and suddenly the server's connection is lost... it will rollback its transaction if the time of waiting is greater than defined time out limit ???

Regards, Vincent

Found this : Base.connection().setNetworkTimeout(); but... No documentation on ActiveJDBC. Does this still work???

1 Answers1

0

This methos is not a function of the framework. The code in question:

Base.connection().setNetworkTimeout()

relates to java.sql.Connection, which is part of JDK/JDBC:

https://docs.oracle.com/javase/8/docs/api/java/sql/Connection.html#setNetworkTimeout-java.util.concurrent.Executor-int-

As such, you can find documentation there. However, I would recommend you to NOT track timeouts but run your statements under transactions. This means that any time you have any error, including network failures, your data integrity will be preserved. See: http://javalite.io/transactions.

ipolevoy
  • 5,432
  • 2
  • 31
  • 46