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 » User Defined Property (UDP) vs Promote Property (PP)

Post new topic  Reply to topic
 User Defined Property (UDP) vs Promote Property (PP) « View previous topic :: View next topic » 
Author Message
gecs
PostPosted: Mon May 21, 2012 9:16 am    Post subject: User Defined Property (UDP) vs Promote Property (PP) Reply with quote

Acolyte

Joined: 14 Nov 2007
Posts: 58

Hi everybody, I would know if exists any form to use a Promote Property as "UDP". It happens I have declared a CONSTANT which has same value of a PP ("queue name" MQGet Node property). So, I want to eliminate the CONSTANT and use the PP value, but when I try to reference it by ESQL editor (like as UDP), it doesn't appear.

One solution could be to create a UDP and override the MQGet Node property "queue name" through LocalEnvironment, but I would like know if is possible reference PP by ESQL editor or if exists other solution (using PP).

Last questions:
- How can I reference it (the PP value)?
- PP only serves to change a BAR property?

Additional Info:
- MQ 7.0
- Message Broker 7.0

Thanks in advance!
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon May 21, 2012 9:26 am    Post subject: Reply with quote

Grand High Poobah

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

AFAIK there's no way to reference any node property within ESQL except insofar as some node expose details through LocalEnvironment.

The question comes why are you attempting to reference the queue name of the node inside ESQL? It's very anti-pattern, as if the WMQ administrator ever decides to rename the queue & correctly resets the promoted property to reflect the change your code will still be hosed.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
gecs
PostPosted: Mon May 21, 2012 9:59 am    Post subject: Reply with quote

Acolyte

Joined: 14 Nov 2007
Posts: 58

Vitor wrote:

The question comes why are you attempting to reference the queue name of the node inside ESQL?


Hi @Vitor, thanks for your reply. According to your question, I want to reference this promote property (queue name) because of I need its value in different parts of the code and this value can change according the environment where flow is deployed. Also, I don't want to use any CONSTANT which constains same value.

Regards.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon May 21, 2012 10:15 am    Post subject: Reply with quote

Grand High Poobah

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

gecs wrote:
I want to reference this promote property (queue name) because of I need its value in different parts of the code and this value can change according the environment where flow is deployed.


That's exactly my point. If someone renames the queue 6 months / 1 year / 5 years down the road your code will cease to work.

If you want to identify which enivornment you're in better ways include (but are not limited to):

- a UDP (which has the advantage of allowing you to make code in any enivornment act as if it's in any other environment & is my personal favorite)

- the broker name (which typically has some part of it's name indicating the environment it belongs to)
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon May 21, 2012 10:15 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

So you need to set a User Defined Property and use the User Defined Property to Set the Destination that the MQGetNode will use to read the name of the queue to determine what queue to read from.

That is, rather than using the Promoted Property of the node, you need to use a UDP and LocalEnvironment overrides.

The only way to get at a Promoted Property, or any property of a message flow, is using the Admin API which is only available from Java.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon May 21, 2012 10:22 am    Post subject: Reply with quote

Grand High Poobah

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

mqjeff wrote:
The only way to get at a Promoted Property, or any property of a message flow, is using the Admin API which is only available from Java.


Which is a fairly heavy sledgehammer in an application flow.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon May 21, 2012 10:24 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Vitor wrote:
mqjeff wrote:
The only way to get at a Promoted Property, or any property of a message flow, is using the Admin API which is only available from Java.


Which is a fairly heavy sledgehammer in an application flow.



It's easier in v7 and v8 because you can get a proxy to the broker you're running under without having to create a new connection object and etc. etc. etc.

but it's still the long way around.
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 » User Defined Property (UDP) vs Promote Property (PP)
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.