Author |
Message
|
mustang |
Posted: Thu Nov 16, 2006 2:17 pm Post subject: References and Procedures |
|
|
Acolyte
Joined: 07 Feb 2006 Posts: 72
|
WMB 6.
I have a procedure that takes in a reference to InputRoot and Environment.
CREATE PROCEDURE logMessage(In InputRoot Reference, In Environment Reference)
Is there any benefit (resource saving, etc) to passing it a reference versus InputRoot and Environment directly?
Declare InRef Reference To InputRoot;
Declare EnvRef Reference To Environment;
Call logMessage(InRef, EnvRef);
vs.
Call logMessage(InputRoot, Environment);
Thanks!!!!!! |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Nov 16, 2006 5:43 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
One works and the other doesn't. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Nov 16, 2006 7:36 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
jefflowrey wrote: |
One works and the other doesn't. |
???
Care to elaborate some? From my experience both work however there are some marked differences that can be aleviated by astute coding... or is this only the case in V6?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mustang |
Posted: Fri Nov 17, 2006 7:00 am Post subject: |
|
|
Acolyte
Joined: 07 Feb 2006 Posts: 72
|
Both do work. The examples in the WMB6 documentation usually show the pattern:
Call logMessage(InputRoot, Environment);
However, we would like to know if WMB is making "copies" of InputRoot and Environment everytime we do it this way. I couldn't see any documenation that clarifies this.
Thanks!!!!!! |
|
Back to top |
|
 |
JosephGramig |
Posted: Fri Nov 17, 2006 7:05 am Post subject: |
|
|
 Grand Master
Joined: 09 Feb 2006 Posts: 1244 Location: Gold Coast of Florida, USA
|
No. It is not making copies because if you modify Environment, it is still modified after return. _________________ Joseph
Administrator - IBM WebSphere MQ (WMQ) V6.0, IBM WebSphere Message Broker (WMB) V6.1 & V6.0
Solution Designer - WMQ V6.0
Solution Developer - WMB V6.1 & V6.0, WMQ V5.3 |
|
Back to top |
|
 |
mustang |
Posted: Fri Nov 17, 2006 7:12 am Post subject: |
|
|
Acolyte
Joined: 07 Feb 2006 Posts: 72
|
Thanks!!!!!!!!!!!!!!!!!!!!! |
|
Back to top |
|
 |
|