|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
DatabaseRetrieve node, multiple rows into multiple elements |
« View previous topic :: View next topic » |
Author |
Message
|
afaizan |
Posted: Sun Jun 03, 2012 6:16 am Post subject: DatabaseRetrieve node, multiple rows into multiple elements |
|
|
Newbie
Joined: 03 Jun 2012 Posts: 3
|
Hello,
Is there a way to assign result from each row from DatabaseRetrieve node to a different element ?
For example, in the InfoCenter, it is mentioned,
http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/topic/com.ibm.etools.mft.doc/ac37390_.htm#ac37390_example
Quote: |
If you select the Multiple rows property, and details of both of the employees are returned from a query in the form of two rows in the result set, the resulting outgoing message is:
Code: |
<EmployeeRecord>
<EmployeeNumber>00001</EmployeeNumber>
<Surname>Smith</Surname>
<Wage>20000</Wage>
<EmployeeNumber>00002</EmployeeNumber>
<Surname>Jones</Surname>
<Wage>26000</Wage>
</EmployeeRecord>
|
|
Can we have DatabaseRetrieve node return instead,
Code: |
<EmployeeRecord>
<EmployeeNumber>00001</EmployeeNumber>
<Surname>Smith</Surname>
<Wage>20000</Wage>
</EmployeeRecord>
<EmployeeRecord>
<EmployeeNumber>00002</EmployeeNumber>
<Surname>Jones</Surname>
<Wage>26000</Wage>
</EmployeeRecord>
|
What is the xpath entry I need to specify in 'Message element' attribute to achieve the above?
Thanks in advance for help. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Mon Jun 04, 2012 5:05 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
If using WMB V7, rather than use xpath, consider using ESQL and executing your query directly from ESQL. That way all your logic will fit in one node and you can shape the output tree easily. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jun 04, 2012 7:01 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
lancelotlinc wrote: |
If using WMB V7, rather than use xpath, consider using ESQL and executing your query directly from ESQL. That way all your logic will fit in one node and you can shape the output tree easily. |
Except, of course, this is an xpath expression in use by the DatabaseRetrieve node, and the point of the question is to ensure that all of the logic does fit into a single node. |
|
Back to top |
|
 |
afaizan |
Posted: Mon Jun 04, 2012 10:03 pm Post subject: |
|
|
Newbie
Joined: 03 Jun 2012 Posts: 3
|
Quote: |
If using WMB V7, rather than use xpath, consider using ESQL and executing your query directly from ESQL. That way all your logic will fit in one node and you can shape the output tree easily. |
I'm using WMB V8. That is what I have ended up doing. I wanted to use DatabaseRetrieve node, but since I could not figure out a way to construct multiple elements from database result, I have used Compute node + ESQL. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Jun 05, 2012 4:36 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
afaizan wrote: |
Quote: |
If using WMB V7, rather than use xpath, consider using ESQL and executing your query directly from ESQL. That way all your logic will fit in one node and you can shape the output tree easily. |
I'm using WMB V8. That is what I have ended up doing. I wanted to use DatabaseRetrieve node, but since I could not figure out a way to construct multiple elements from database result, I have used Compute node + ESQL. |
The database nodes in the WMB product are among the least mature implementations when compared to other WMB nodes. We've had so much trouble with them that we made the strategic unilateral decision to remove all database interactions from our ESB and put the database operations into a Web Service facade.
This was due to several factors. For one, if you increment the additional threads on a message flow that multiplies your DB2 connections by that amount. So, if your flow originally used three connections, and you have three additional instances, you now have twelve DB2 connections ( [1+3]*3 ). Our mainframe DB2 instance frizzes out with too many connections -- not related to license, but related to its ability to simultaneously process that many requests.
Our ESB implements a Point-Of-Sale system. It is imperative that it be nimble and quick. By moving the database operations to a Web Service, and having the ESB make a Web Service call, the architecture better supports the ESB's need to be nimble by moving some of the complexity out of the ESB.
Essentially, we've reduced about 200 DB2 connections to only one. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
afaizan |
Posted: Wed Jun 06, 2012 1:15 am Post subject: |
|
|
Newbie
Joined: 03 Jun 2012 Posts: 3
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|