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 » Difference between variables

Post new topic  Reply to topic
 Difference between variables « View previous topic :: View next topic » 
Author Message
kash3338
PostPosted: Thu Jun 04, 2009 4:52 am    Post subject: Difference between variables Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

Hi,

Can anyone tell me the difference between,

Environment.Variable.cTemp
Environment.Variables.cTemp and
OutputLocalEnvironment.Variables.cTemp.

What is the basic difference between them and which is more efficient to use?
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Thu Jun 04, 2009 4:57 am    Post subject: Re: Difference between variables Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kash3338 wrote:
What is the basic difference between them and which is more efficient to use?


The basic difference is the last one is stored in a different place to the top 2, has a different scope and is hence used in different situations.

The documentation explains the difference between Environment & LocalEnvironment quite well. In concept it's the same difference as a global variable & a local variable.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Jun 04, 2009 7:07 am    Post subject: Re: Difference between variables Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

kash3338 wrote:
Environment.Variable.cTemp
Environment.Variables.cTemp


There is no meaningful difference between these two.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jun 04, 2009 7:27 am    Post subject: Re: Difference between variables Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqjeff wrote:
kash3338 wrote:
Environment.Variable.cTemp
Environment.Variables.cTemp


There is no meaningful difference between these two.




The quality & detail of my posts is diminishing. Shouldn't post while trouting the on-site unworthy
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
rekarm01
PostPosted: Thu Jun 04, 2009 1:14 pm    Post subject: Re: Difference between variables Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

mqjeff wrote:
kash3338 wrote:
Environment.Variable.cTemp
Environment.Variables.cTemp

There is no meaningful difference between these two.

... except that IBM documents only the Environment.Variables subtree for use by the message flow developer:
Quote:
If you want to create your own information, create it in the environment tree within a subtree called Variables.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Jun 05, 2009 3:18 am    Post subject: Re: Difference between variables Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

rekarm01 wrote:
... except that IBM documents only the Environment.Variables subtree for use by the message flow developer:
Quote:
If you want to create your own information, create it in the environment tree within a subtree called Variables.


That's a switch.

It still doesn't make a difference, unless someone's gone out of their way to introduce hidden changes in this since version 6.0. Which isn't likely.

Certainly Environment.Variables is a "well known" location, but there should be no discernable behavior differences between storing your own data there and any other location under Environment. Unless there is more documentation that I've missed that says otherwise, of course.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Jun 05, 2009 3:31 am    Post subject: Re: Difference between variables Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqjeff wrote:
rekarm01 wrote:
... except that IBM documents only the Environment.Variables subtree for use by the message flow developer:
Quote:
If you want to create your own information, create it in the environment tree within a subtree called Variables.


That's a switch.

It still doesn't make a difference, unless someone's gone out of their way to introduce hidden changes in this since version 6.0. Which isn't likely.

Certainly Environment.Variables is a "well known" location, but there should be no discernable behavior differences between storing your own data there and any other location under Environment. Unless there is more documentation that I've missed that says otherwise, of course.


The link quoted does indeed say that, but the diagram immediately under it describes it as "an example of an Environment tree" (the italics are mine). IMHO this link is suggesting rather than defining.

FWIW this site uses Environment rather more than I approve of but it doesn't cause more ill effects than you'd expect to have:

Code:

Environment.SystemA.TransactionId
Environment.SystemA.OriginalMsgId
Environment.SystemB.TransactionId
Environment.SystemB.Mode
etc
etc


i.e. multiple "Variables" trees under Environment.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
rekarm01
PostPosted: Sun Jun 07, 2009 12:39 pm    Post subject: Re: Difference between variables Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

mqjeff wrote:
rekarm01 wrote:
... except that IBM documents only the Environment.Variables subtree for use by the message flow developer:
Quote:
If you want to create your own information, create it in the environment tree within a subtree called Variables.

It still doesn't make a difference, unless someone's gone out of their way to introduce hidden changes in this since version 6.0. Which isn't likely.

Certainly Environment.Variables is a "well known" location, but there should be no discernable behavior differences between storing your own data there and any other location under Environment. Unless there is more documentation that I've missed that says otherwise, of course.

The difference is that the documentation recommends the former, and does not recommend the latter. This might be an inconsequential difference, as it's merely a recommendation rather than a requirement, but it's still worth pointing out, particularly in response to a direct question about what the difference is.

There is no discernible difference in behavior between the two, unless the location of user-defined data happens to conflict with the location of any broker-defined data. (For example, Environment.Broker.Accounting.Origin would be a bad place to store unrelated user-defined data.)

Even if there is no conflict with the current version of the broker, there's no assurance that a future broker upgrade won't introduce a conflict ... unless the user follows the recommended practice, confining user-defined data within a Variables subtree.
Back to top
View user's profile Send private message
Vitor
PostPosted: Sun Jun 07, 2009 2:55 pm    Post subject: Re: Difference between variables Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

rekarm01 wrote:
There is no discernible difference in behavior between the two, unless the location of user-defined data happens to conflict with the location of any broker-defined data. (For example, Environment.Broker.Accounting.Origin would be a bad place to store unrelated user-defined data.)


Not an ideal example - it's no worse than storing user data in any other accounting field (which is not best practice obviously).


rekarm01 wrote:
Even if there is no conflict with the current version of the broker, there's no assurance that a future broker upgrade won't introduce a conflict ... unless the user follows the recommended practice, confining user-defined data within a Variables subtree.


If that happens, this site is seriously hosed!

The point here we can all agree on is that there is a documented IBM recommendation (not a requirement), so not following this recommendation carries the same weight & risk as not following any other. And though it's the recommended practice, it's not a requirement.
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » Difference between variables
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.