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 » FlowOrder and Compute Node bug?

Post new topic  Reply to topic Goto page Previous  1, 2
 FlowOrder and Compute Node bug? « View previous topic :: View next topic » 
Author Message
smdavies99
PostPosted: Sun Dec 20, 2009 8:22 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

I think it is working as designed.
Just about the first thing I was taught when I took a broker class back in the 2.0.1 days, was to treat anything in the Input* folders as READ ONLY.
I've never had an issue with FlowOrder nodes being the cause of corruption probably because I still follow the Read Only rule that I was taught over 8 years ago. I just never even thought of trying to change it.
Now that I think about it, I'm even more of the opinion that trying to do this is a bad idea.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
Esa
PostPosted: Sun Dec 20, 2009 10:57 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Exactly.

I must correct my previous reply. I ment to say that references AND java API make it possible to modify InputRoot. And I agree that doing it would in most cases be a bad idea.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Sun Dec 20, 2009 10:41 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi,

I'm waiting for someone from the labs to end this confusion...even the use of FINALIZE clause needs some elaboration.

Regards.
Back to top
View user's profile Send private message Send e-mail
rekarm01
PostPosted: Mon Dec 21, 2009 3:47 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

Esa wrote:
I have even told my students to try to avoid certain nodes because I supposed they issue a deep copy of the message under the hood.

Which nodes would that be?

The Compute node, for example, does not perform any deep copies "under the hood". Initially, it receives three Input trees, and creates three additional, empty, Output trees. The ESQL is responsible for populating the output trees; it might perform deep copies, but that's out in the open.

When propagating, either the "Compute mode" property or the PROPAGATE "MessageSources" clause determines which of the Input/Output trees to propagate, (regardless of which trees the Compute node actually modifies).
Back to top
View user's profile Send private message
rekarm01
PostPosted: Mon Dec 21, 2009 5:30 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

smdavies99 wrote:
Just about the first thing I was taught when I took a broker class back in the 2.0.1 days, was to treat anything in the Input* folders as READ ONLY.

Back in the MQSI 2.0.1 days, the Input trees were READ ONLY. There were no reference variables, PROPAGATE statements, etc.; it might have been possible to modify Input trees with a C or Java custom node, but that's a little difficult to confirm at the moment.

The point of confusion is whether the rules have changed since then, and if so, how?

smdavies99 wrote:
Now that I think about it, I'm even more of the opinion that trying to do this is a bad idea.

More often than not, it probably is a bad idea. One scenario where it might seem useful though: a compute node propagates a message tree multiple times, and the downstream nodes apply cumulative modifications to that message tree instance. However, even if the original developer understood how to implement that correctly, the poor sap who inherits the code might decide it's all wrong, and try to "fix" it. For the cost of an extra tree copy, a much cleaner approach is to apply downstream modifications to the Environment tree instead (InputRoot -> Environment -> OutputRoot); Environment is always modifiable, and there's no need to worry about Input versus Output, or finalization.

elvis_gn wrote:
I'm waiting for someone from the labs to end this confusion...even the use of FINALIZE clause needs some elaboration.

Yes, that would help a lot. The documentation regarding finalization is a bit sparse, and sometimes unclear. Until the confusion is cleared up, it's probably best not to tinker with Input trees or FINALIZE clauses.
Back to top
View user's profile Send private message
Esa
PostPosted: Wed Dec 23, 2009 1:35 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Esa wrote:
I have even told my students to try to avoid certain nodes because I supposed they issue a deep copy of the message under the hood.

rekarm01 wrote:
Which nodes would that be?


What I meant is that I have incorrectly assumed that certain nodes make a deep copy of the message, and even told that to my students.

My assumption was that for example FlowOrder propagates an intact copy of InputRoot to both terminals. Which would invove taking a backup copy of InputRoot in FlowOrder before propagating to terminal 1 and propagating the copy to terminal 2. Which is NOT the way it happens or should happen. The results of test case 3 are correct and there is no bug.

Other nodes that operate similarly are for example MQInput and TryCatch. MQInput does not keep an extra copy of the message but propagates the same memory pointer to both Out and Catch terminals. So if you modify InputRoot in the main flow it is possible that the message that is propagated to catch is no longer the same message that was got from the queue. That should give you an idea why you should never modify InputRoot unless you have a very good reason and know exactly what you are doing and what consequences it may have.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » FlowOrder and Compute Node bug?
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.