views:

33

answers:

1

Just wanted to know what is the difference between the two fields putApplicationName field which is a part of the MQMessage class and putApplName which is a part of MQMD class. When to choose what?

A: 

Use putApplName when using the JMS classes and use putApplicationName when using the native Java classes.

T.Rob
But both fields belong to IBM Native classes..
hakish
When I search the *WMQ Classes for Java* section of the manual for `putApplicationName` the only reference is in the MQConstants class. When I search the *WMQ Classes for JMS* section of the manual the only reference to `putApplName` is as a native MQ field that `putApplicationName`maps to. As with your other recent question, I'm basing my answer on what IBM documents. Are you looking at one of the lower-level internal classes?
T.Rob
i have an app client with a conditional logic based on one of MQ header fields, after exploring a bit i narrowed down the field to putApplicationName which is a part of com.ibm.mq.MQMessage Class. I am able to set the value for this field and go on my merry own way, but i also find this field putApplName which belongs to com.ibm.mq.headers.MQMD class which also allows me to set the value with setPutApplName(); so my query was are the two fields somehow the same or are there any more specifics to them for use?
hakish
Two comments - since one of these calls is undocumented, don't use it. Use the documented API if you want to make sure the class won't change out from under you after a fix pack is applied. The other comment is that the ability to set the value in the MQMD is administrative. Using that API will make the application dependent on having that administrative authority. If someone tries to restrict the privileges used by the app it will break so be sure to document why the app requires the admin rights.
T.Rob