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 » CopyMessageHeaders() and CopyEntireMessage()

Post new topic  Reply to topic
 CopyMessageHeaders() and CopyEntireMessage() « View previous topic :: View next topic » 
Author Message
francoisvdm
PostPosted: Thu May 21, 2009 4:51 am    Post subject: CopyMessageHeaders() and CopyEntireMessage() Reply with quote

Partisan

Joined: 09 Aug 2001
Posts: 332

Every time you create a compute node these two procedures gets created automatically for you.

Is it good practice to remove those two procedures (or the one you do not use) from your ESQL code?

The reason why I ask is... what happens during deploy time? Is those code deployed multiple times...or is it smart enough to re-use the code if it was deployed somewhere else?

Will this save a little bit of memory if we remove all unused procedures?

Thanks all
_________________
If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.

Francois van der Merwe
Back to top
View user's profile Send private message Send e-mail
Hari
PostPosted: Thu May 21, 2009 1:00 pm    Post subject: Reply with quote

Centurion

Joined: 21 Nov 2002
Posts: 117
Location: USA

Quote:
The reason why I ask is... what happens during deploy time? Is those code deployed multiple times...or is it smart enough to re-use the code if it was deployed somewhere else?


Its the msg flow which is deployed (atleast superficially), not the procedure...you can consider the procedures (loosely) something like a method in Java.
The way the procedures are defined (scope) you cannot re-use it from somewhere else.

Quote:
Will this save a little bit of memory if we remove all unused procedures?


a really minute bit I say....may be the memory for the defined integers when the procedures are executed and may be some other which I am not aware of.


Quote:
Is it good practice to remove those two procedures (or the one you do not use) from your ESQL code?

If you are not using these procedures, remove them...I dont use these procedures.
If needed I do a direct copy of the msg tree in my Main function.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri May 22, 2009 5:00 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

If you do not call a procedure at all from within the esql added to a bar file, the bar file compiler will remove it, at least in later versions of Broker.

The only impact that leaving these procedures in will have is to take up some additional space in the broker database. And by "additional space" what I mean is "space equivalent to the number of characters in them". This is a small number.

It's entirely possible to put these procedures into a shared schema, and call those copies instead. It then takes extra effort every time you create a new compute module to remove those and update the template to call the shared version.

I generally find it more readable to use the pre-supplied procedures, and never edit or change them, than to copy/paste them into the main routine.
Back to top
View user's profile Send private message
Hari
PostPosted: Fri May 22, 2009 9:57 am    Post subject: Reply with quote

Centurion

Joined: 21 Nov 2002
Posts: 117
Location: USA

Direct copy of the msg tree, well I meant to say doing a
SET OutputRoot.Properties = InputRoot.Properties ....etc, instead of calling the copymessageHeader()

IMO the cardinality and the looping makes the CopyMessageHeader() a tad bit expensive.......and since most of the time, I know the headers in the incoming msg, I try not using the procedure in their original form.
Back to top
View user's profile Send private message
Sridar
PostPosted: Tue Jun 16, 2009 11:09 pm    Post subject: Reply with quote

Acolyte

Joined: 14 May 2006
Posts: 72
Location: Chennai, India

I have tried calling from a seperae function but failed.

The problem arises because of the cardinality, and passing and retireving the tree(atleast the headers).

I had posed the same question long time back but no result.

I think it is more easier to call it everytime.

Sridar
_________________
Thanks and Regards
Sridar
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jun 17, 2009 2:21 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Sridar wrote:
I have tried calling from a seperae function but failed.

The problem arises because of the cardinality, and passing and retireving the tree(atleast the headers).

I had posed the same question long time back but no result.

I think it is more easier to call it everytime.

Sridar

As said many times on this forum, if you try to do this from a common broker schema you need to pass the arguments (InputRoot, OutputRoot) by REFERENCE...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » CopyMessageHeaders() and CopyEntireMessage()
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.