In Message broker, from Java compute node, I am calling a oracled stored procedure using callable statement. In that I am setting the timeout using setQueryTimeout() and I am setting the time as 30 secs. When I invoke the stored procedure, the stored procedure is not timing out in exactly 30 secs. For example, we tested like this.
1. we put a sleep of 3 mins with in the oracle stored procedure
Eventhough I set the timeout as 30 secs, it did not timeout soon after 30 secs but after 3 mins + (6 to 10 secs). Why is time out not happening in 30 secs?
Also in some scenerios, I am not getting SQLException at all, the stored procedure is returning the actual input xml. why is that?
See "Oracle® Database JDBC Developer’s Guide and Reference, 11g Release 1 (11.1)" - note on page 1-3:
JDBC Server-Side Internal Driver
The JDBC server-side internal driver supports any Java code that runs inside Oracle
Database, such as in a Java stored procedure, and must access the same database. It
lets the Java Virtual Machine (JVM) to communicate directly with the SQL engine. This
driver supports only JDK 1.5.
The JDBC server-side internal driver, the Oracle JVM, the database, and the SQL
engine all run within the same address space, and therefore, the issue of network
round-trips is irrelevant. The programs access the SQL engine by using function calls.
The server-side internal driver does not support the cancel and setQueryTimeout methods of the Statement class.