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 » References and Procedures

Post new topic  Reply to topic
 References and Procedures « View previous topic :: View next topic » 
Author Message
mustang
PostPosted: Thu Nov 16, 2006 2:17 pm    Post subject: References and Procedures Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Thu Nov 16, 2006 5:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Thu Nov 16, 2006 7:36 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
mustang
PostPosted: Fri Nov 17, 2006 7:00 am    Post subject: Reply with quote

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
View user's profile Send private message
JosephGramig
PostPosted: Fri Nov 17, 2006 7:05 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
mustang
PostPosted: Fri Nov 17, 2006 7:12 am    Post subject: Reply with quote

Acolyte

Joined: 07 Feb 2006
Posts: 72

Thanks!!!!!!!!!!!!!!!!!!!!!
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 » References and Procedures
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.