Error message as DBSQLException: java.sql.SQLTimeoutException

Error message as DBSQLException: java.sql.SQLTimeoutException

book

Article ID: KB0093430

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks Plug-in for Database -
Not Applicable -

Description

Description:
One subscriber of TIBCO Adapter for ActiveDatabase reports the error: com.tibco.adapter.adb.database.DBSQLException: java.sql.SQLTimeoutException: [tibcosoftwareinc][Oracle JDBC Driver]Execution timeout expired. In the TIBCO Adapter for ActiveDatabase logs, only some JDBC execution timeout errors are reported. Have set adb.subBatchCommitTimeout to 15000 and adb.subBatchCommitSize to 500.

Issue/Introduction

Error message as DBSQLException: java.sql.SQLTimeoutException

Resolution

querytimeout set to 60 seconds in JDBC properties.

Solution 1): Remove the JDBC property setting in the Designer project.

Solution 2): Set JDBC URL=jdbc:tibcosoftwareinc:oracle://<ip_adress>:1521;SID=<SID>;QueryTimeout=5;EnableCancelTimeout=true to make the SQL statement return a timeout error in 5 seconds and then send the response to TIBCO Adapter for ActiveDatabase.

Note:

1). The modification of the global variable in the .tra file could be overwritten by the JDBC properties in the Designer project, so users still need to modify the Designer project to disable the timeout feature.

2). The benefit of disabling querytimeout is to let the TIBCO Adapter for ActiveDatabase keep waiting for the result on the DB side. The disadvantage is that it will reduce performance because unless a previous request was finished, other requests could be fetched by the TIBCO Adapter for ActiveDatabase.

Additional Information

Some introductions on QueryTimeout and EnableCancelTimeout:
QueryTimeout:

Sets the default query timeout (in seconds) for all statements created by a connection.

EnableCancelTimeout:
Determines whether a cancel request that is sent as the result of a query timing out is subject to the same query timeout value as the statement it cancels. You can refer to <TPCL_HOME>/jdbc/Help/help.htm -> Oracle Driver -> Connection properties -> EnableCancelTimeout for more detail.