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 » Environment & LocalEnvironment

Post new topic  Reply to topic
 Environment & LocalEnvironment « View previous topic :: View next topic » 
Author Message
eknathv
PostPosted: Thu May 05, 2005 11:03 pm    Post subject: Environment & LocalEnvironment Reply with quote

Apprentice

Joined: 14 Aug 2002
Posts: 27
Location: Bangalore

Hi,

I was looking for conceptual clarification on the variables "Environment" & "LocalEnvironment" . Well the manulas says "Environment" is global variable & "LocalEnvironment" is a local variable.
I am not able to figure out the limitations of these variables. In a message flow If I use extensively "Environment" variable it works fine, but if I replce the same with "LocalEnvironment" then also it works fine.

Possibly if any one can explain the difference between the local & global it will be great help to understand the concept.

Thanks in advance.

Thanks & Regards,
Eknath Vashishtha
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
martinrydman
PostPosted: Fri May 06, 2005 12:33 am    Post subject: Reply with quote

Centurion

Joined: 30 Jan 2004
Posts: 139
Location: Gothenburg, Sweden

Hi,

Environment is simply a global storage area, always available. It is never used by the system, only by you. You can populate it whenever and however you want.

LocalEnvironment differs from Environment in the following ways:
- The system uses som predefined locations in this tree for stuff like dynamic queue assignment (DestinationList), RoutToLabel and so on
- If you want to alter LocalEnvironment in a compute node, you must set the Compute Node's Compute Mode to include LocalEnvironment
- Like Root, in a Compute Node, there is an InputLocalEnvironment and an OutputLocalEnvironment. If Compute Node includes LocalEnvironment, you must assign OutputLocalEnvironment, otherwise an empty tree is propagated downstream

So, when to use which? I usually use Environment for all application specific storage requirements, and use LocalEnvironment for the specific purposes it is ment for, even though I could also use it to store other information.

HTH

/Martin
Back to top
View user's profile Send private message
eknathv
PostPosted: Fri May 06, 2005 2:27 am    Post subject: Reply with quote

Apprentice

Joined: 14 Aug 2002
Posts: 27
Location: Bangalore

Hi Martin,

Thanks for the inputs, YES you are very correct that "LocalEnvironment" is having a pre defined tree structure + Customized Tree Structure as well. While "Environment" don't have any pre defined Tree Structure.

I was exploring further for global & local definition & I had idetified following thigs, just wanted to share.
LocalEnvironment : It carries 2 major variables InputLocalEnvironment { Its readonly like InputRoot } & OutputLocalEnvironment { This can be changed }. But If we DO NOT write ( SET OutputLocalEnvironment = InputLocalEnvironment ) the LocalEnvironment Tree lost.
But incase of Environment its not like this. Just check below message flow.

MQInput --> Comput1 --> Compute2 --> Compute3 --> MQOutput


Compute1 :
SET OutputRoot = InputRoot;
SET Environment.Variable.Num = 10 ;
SET OutputLocalEnvironment.Variable.Num = 20 ;
Compute2 :
SET OutputRoot = InputRoot;
Compute3 :
CopyMessageHeader ;
SET OutputRoot.XML.MQSIMessage.Env.Val = Environment.Variable.Num;
SET OutputRoot.XML.MQSIMessage.LocalEnv.Val = InputLocalEnvironment.Variable.Num ;


The Result is
<MQSIMessage><Env><Val>10</Val></Env><LocalEnv/></MQSIMessage>


But If we add following line in Comput2
SET OutputLocalEnvironment = InputLocalEnvironment ;

then the output is

<MQSIMessage><Env><Val>10</Val></Env><LocalEnv><Val>20</Val></LocalEnv></MQSIMessage>


I suppose that is local & global.


Thanks & Regards,

Eknath
_________________
Eknath Vashishtha
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
martinrydman
PostPosted: Fri May 06, 2005 3:28 am    Post subject: Reply with quote

Centurion

Joined: 30 Jan 2004
Posts: 139
Location: Gothenburg, Sweden

Just to reiterate the Compute Mode property of the Compute Node (I do this because I remember how frustrating it was before I understood how it works.

If LocalEnvironment is *not* included in Compute Mode, it will pass untouched thru the compute node even if you don't assign OutputLocalEnvironment. And, in the same scenario, if you *do* assign OutputLocalEnvironment, it won't propagate outside the compute node.

/Martin
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 » Environment & LocalEnvironment
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.