• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

JDBC to DB2 Mainframe - query timeout

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please post a stack trace. Are you sure its not a transaction timeout?
 
Mary Jane Sam
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What server are you using? Its usually set there.
 
Mary Jane Sam
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
It's hard to fight evil. The little things, like a nice sandwich, really helps. Right tiny ad?
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic