File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC to DB2 Mainframe - query timeout

 
Mary Jane Sam
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am connecting to DB2 Database in mainframe through DB2 universal type 4 driver and invoke a Stored procedure in DB2 using CallableStatement.

If the stored procedure did not return result within a specific time interval, the process should continue without waiting for the result.

I used setQueryTimeout to set the timeout interval and it does not work for DB2. Is there any way, i can set the timeout?

Thanks..
[ September 11, 2008: Message edited by: Mary Jane Sam ]
 
Scott Selikoff
author
Saloon Keeper
Posts: 3901
16
Eclipse IDE Flex Google Web Toolkit
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post a stack trace. Are you sure its not a transaction timeout?
 
Mary Jane Sam
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no stack trace and the execution of Stored procedure continues even after the specified time and no exception is thrown.

How to do we set the transaction timeout?
 
Scott Selikoff
author
Saloon Keeper
Posts: 3901
16
Eclipse IDE Flex Google Web Toolkit
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What server are you using? Its usually set there.
 
Mary Jane Sam
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the response.

I use Websphere server. I tried setting the Total transaction timeout as 1 sec and Maximum lifetime timeout as 2 seconds. Still, the application did not timeout even after the query takes more than 20 seconds.

Is there we can timeout while connecting to DB2 mainframe server when using Db2 universal type 4 driver?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic