|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
'Data Source' Property Question |
« View previous topic :: View next topic » |
Author |
Message
|
TonyD |
Posted: Thu Sep 09, 2004 9:29 pm Post subject: 'Data Source' Property Question |
|
|
Knight
Joined: 15 May 2001 Posts: 540 Location: New Zealand
|
We have a shareable function that performs a table lookup and returns data. The 'Data Source' property of the user flow Compute node from which the function is referenced contains the database name, as you would expect. This works fine.
However we have noticed that if there are multiple Compute nodes in the flow all must also have the 'Data Source' populated with the same database name although they do not call the function. Has anyone else encountered this?
The function is specified under its own schema, which is used to qualify it when it used in a Compute node. |
|
Back to top |
|
 |
kirani |
Posted: Thu Sep 09, 2004 10:06 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Since the function is in a different schema, the generated code for this function is deployed to each node in that message flow. Hence, it will need the DataSource proerty populated for every node. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
mgk |
Posted: Fri Sep 10, 2004 12:15 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Hi,
kirani said
Quote: |
Since the function is in a different schema, the generated code for this function is deployed to each node in that message flow. Hence, it will need the DataSource proerty populated for every node. |
This is almost it, is should read:
Quote: |
Since the function is in a different schema, the generated code for this function is deployed to each node in that message flow that references that schema. Hence, it will need the DataSource proerty populated for every node. |
Essentially, each ESQL node gets an entire copy of the contents of every schema that it references, whether or not it will call the code in that schema. For this reason it is better to use several small schemas, rather than one large one when developing "reusable" code that lives in separate schemas. Note that when I say "references" I mean either in a PATH clause or by using a qualified name such as mySchema.myFunc().
The reason behind this is that because is is possible to call a user defined function using EVAL, the all code / functions are deployed when the schema is referenced, just in case an EVAL statement will need them.
Where you can have problems is where you try to access a DB in a schema level function as TonyD found. This means that each node that uses that schema has to specify the correct datasource on the node. This is a pain and we know it is a pain.
Ideally you would place DB lookup code at the module level in each node that neds that function, then youdo not have this problem. However I know that this is not always possible...
Cheers, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
wmqiguy |
Posted: Wed Jan 19, 2005 1:09 pm Post subject: |
|
|
 Centurion
Joined: 09 Oct 2002 Posts: 145 Location: Florida
|
Bumped into this problem and we can get around it for now. My question is what happens in the future if I need to address two different data sources?
Example:
Let's say that my first compute node is making a direct call to my vendor database (COMPUTE Datasource=VENDOR). Then my second compute node is using code in a different schema to call the customer database(COMPUTE Datasource = CUSTOMER).
Does the whole thing blow up? What if I want the vendor call to become reusable code, as well? I haven't had a chance to model this yet, but my hunch is that it will not work.
I think I have another post for the "What would I like to see in Version 6" thread.  |
|
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
|
|
|
|