ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to specify a timeout when calling a Stored Procedure?

Post new topic  Reply to topic
 How to specify a timeout when calling a Stored Procedure? « View previous topic :: View next topic » 
Author Message
AlanG
PostPosted: Fri Oct 26, 2012 6:41 am    Post subject: How to specify a timeout when calling a Stored Procedure? Reply with quote

Newbie

Joined: 26 Oct 2012
Posts: 3

I have a Compute Node which calls a DB2 z/OS stored procedure via an ODBC data source.

I would like to specify a timeout on the stored procedure call. i.e. If the stored procedure invocation takes longer then x seconds I would like control to return to the flow.

However, so far I have been unable to determine how I can set this.

Does anyone know how I would go about configuring such a timeout?
Is there a default timeout if nothing is explicitly set? My concern is that the flow will wait forever for the stored procedure call to return.

Thanks
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Fri Oct 26, 2012 6:43 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Put the DB call in its own flow driven by either SOAPInput or MQInput. Have your original flow make a call to the new flow. You can timeout on MQGet or SOAPRequest. If using MQ, be sure to set transactionality to NO.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
AlanG
PostPosted: Tue Nov 06, 2012 2:25 am    Post subject: Reply with quote

Newbie

Joined: 26 Oct 2012
Posts: 3

Thanks for your reply lancelotlinc. From what I had read it didn't look like it was possible to set a timeout when using ODBC.

I have been reading up on JavaCompute nodes. I think if I use a Type 4 JDBC Connection from a JavaCompute node I should be able to specify a timeout on the connection.

Thanks for your help.
Back to top
View user's profile Send private message
broker_new
PostPosted: Tue Nov 06, 2012 7:22 pm    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

You have not mentioned the version...WMBv8.0 has that property available to use
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
AlanG
PostPosted: Wed Nov 07, 2012 6:44 am    Post subject: Reply with quote

Newbie

Joined: 26 Oct 2012
Posts: 3

I should have specified on my original post that I am running WMB 7.0.
Back to top
View user's profile Send private message
broker_new
PostPosted: Wed Nov 07, 2012 8:33 am    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

i think it is available in 7.0 as well, check out the LoginTimeout=0 property in the odbc.ini file.
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
mayheminMQ
PostPosted: Thu Nov 08, 2012 4:06 am    Post subject: Reply with quote

Voyager

Joined: 04 Sep 2012
Posts: 77
Location: UK beyond the meadows of RocknRoll

Hi Alan,

Lancellot's suggestion is one of the easier ways of doing it.

If that is not viable, I have a not so good looking option.

Inputnode(MQ or File or watever) --> Compute Node
--> Propagate a timer message for say 5 mins to TimeoutControl node.
--> Call the stored proc
-->If control comes back to Esql node after stored proc is done, propagate a Timer Cancel msg TimeoutControlNode.
--> Else wait for a timeout message to comeout of timeout notification node and throw out an error or something to stop any further transaction from taking place. This error could be further caught and then your normal transaction could go on.

This should work in theory unless I have forgotten something.

And yup told ya it wouldnt be pretty.

In short go with lancelot's approach.. cleaner.. maintainable and makes sense
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to specify a timeout when calling a Stored Procedure?
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.