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 » Connection to DB from Compute node

Post new topic  Reply to topic
 Connection to DB from Compute node « View previous topic :: View next topic » 
Author Message
prat31
PostPosted: Fri Feb 01, 2013 5:26 am    Post subject: Connection to DB from Compute node Reply with quote

Apprentice

Joined: 01 Feb 2013
Posts: 30

In the compute node I have mentioned the DB name and using this the connection from the compute node to the database is done. Also the table names and schema names are used as UDPs.

Inside the compute node I am querying(Select) to a table in database and storing the selected values in Environment variables.

After this this Environment variable is used in the While loop all the selected records are processed.
In this processing it takes about 5 mins.

So in this 5 mins. interval will the connection established to the table for selecting the records be still active and will it lock the table/records??

This is because, the records which I am querying, if I try to update them from some other flow it is giving me timeout exception in the second flow.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Fri Feb 01, 2013 5:28 am    Post subject: Reply with quote

Jedi Knight

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

Set transaction mode to off on your input node. Commit your database rows one at a time.
_________________
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
prat31
PostPosted: Fri Feb 01, 2013 5:34 am    Post subject: Reply with quote

Apprentice

Joined: 01 Feb 2013
Posts: 30

Thanks for the reply..

But the input node is the timer node and in Transaction property of Compute node it is Automatic.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Fri Feb 01, 2013 5:41 am    Post subject: Reply with quote

Jedi Knight

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

Ok, thats fine. Commit your database updates row-by-row so that other processes wanting to use those resources can use them while your updating.
_________________
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
prat31
PostPosted: Fri Feb 01, 2013 5:46 am    Post subject: Reply with quote

Apprentice

Joined: 01 Feb 2013
Posts: 30

In the first flow I am not inserting/updating/deleting...

If I use two compute nodes and from the first one I establish the connection and in the second compute node if I apply the logic will the problem be resolved?

And I wanted to know the reason for the timeout??
Is the reason that the compute node holds the table/record till the time it is active, even thought the records are only selected from the compute node??
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Feb 01, 2013 5:51 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Broker will maintain any connections used in a flow instance until that flow instance has stopped.

If you are only doing selects in the compute, you should explicitly disable the transaction on the compute.

Your database may have row level locking or table level locking in place, even for SELECTs, even if you don't use a transaction on the compute node.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Fri Feb 01, 2013 5:52 am    Post subject: Reply with quote

Jedi Knight

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

Depending on your database, the database settings and your driver, selecting rows may or may not hold a lock on the table. Check with your DBA and review the ODBC configuration steps:

http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fah14440_.htm

The important point is, commit your database operations in your first node as soon as the select is done. And have the second process commit row-by-row.

An alternate design is to send your payloads out to a queue and asynchronously process them in another flow.
_________________
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
prat31
PostPosted: Fri Feb 01, 2013 6:24 am    Post subject: Reply with quote

Apprentice

Joined: 01 Feb 2013
Posts: 30

Thanks all for your reply.

I wanted to know more about the "disable of the transaction on the compute node". And How we enable it and what will it do.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Feb 01, 2013 6:28 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

prat31 wrote:
Thanks all for your reply.

I wanted to know more about the "disable of the transaction on the compute node". And How we enable it and what will it do.


You have already indicated that you know how to tell the compute node to use whatever transaction is available.
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 » Connection to DB from Compute node
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.