• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

setQuerytimeout in CallableStatement not working. Kindly please help

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?

Can someone help me out with this query please?
 
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

Note:
The server-side internal driver does not support the cancel and setQueryTimeout methods of the Statement class.

 
Geetha Gubendran
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But I am connecting to the database using the thin driver, jdbc:oracle:thin:@. Please let me know if this applies to thin server side driver as well?
 
There are 29 Knuts in one Sickle, and 17 Sickles make up a Galleon. 42 tiny ads in a knut:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic