|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
![Reply to topic](templates/DAJ_Glass/images/lang_english/reply.gif) |
|
MQIACH_CHANNEL_TYPE |
« View previous topic :: View next topic » |
Author |
Message
|
Steve Coleman |
Posted: Fri Sep 15, 2017 6:54 am Post subject: MQIACH_CHANNEL_TYPE |
|
|
Newbie
Joined: 15 Sep 2017 Posts: 3
|
I'm attempting to get the channel type from my MQ virtual appliance. I have a java app and everything seems to be working fine except this.
String[] chTypeText = {"SENDER", "SERVER", "RECEIVER", "REQUESTER", "SVRCONN", "CLNTCONN", "CLUSRCVR", "CLUSSDIR"};
The channel type I'm inquiring about is definitely a SVRCONN channel because that's how it's listed in "display channel(*)". However the chTypeText keeps indexing to "CLUSSDIR" or int = 7 as the results.
Are my constants in chTypeText in the correct order? Am I missing any?
Thanks..any guidance is much appreciated. |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
exerk |
Posted: Fri Sep 15, 2017 7:38 am Post subject: |
|
|
![](images/avatars/148480827754327ad624e20.jpg) Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Should not "CLUSSDIR" read "CLUSSDR" ? _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
Steve Coleman |
Posted: Fri Sep 15, 2017 8:37 am Post subject: |
|
|
Newbie
Joined: 15 Sep 2017 Posts: 3
|
Apologies...yes it should have been
String[] chTypeText = {"SENDER", "SERVER", "RECEIVER", "REQUESTER", "SVRCONN", "CLNTCONN", "CLUSRCVR", "CLUSSDR"};
That has been corrected. But the index being returned is "7" which would indicate that the channel type is a "CLUSSDR" but it's a SVRCONN channel.
So I'm asking if the constants are correct and in the appropriate position and / or am I missing any because the returned value is not correct with respect to the actual channel type.
Thanks xerk |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
RogerLacroix |
Posted: Fri Sep 15, 2017 10:07 am Post subject: |
|
|
![](images/avatars/136281076646ca0b3d89dee.gif) Jedi Knight
Joined: 15 May 2001 Posts: 3254 Location: London, ON Canada
|
Hi,
I think you are confused about the channel type value returned:
Code: |
- MQCHT_SENDER = 1
- MQCHT_SERVER = 2
- MQCHT_RECEIVER = 3
- MQCHT_REQUESTER = 4
- MQCHT_ALL" = 5
- MQCHT_CLNTCONN = 6
- MQCHT_SVRCONN = 7
- MQCHT_CLUSRCVR = 8
- MQCHT_CLUSSDR = 9
- MQCHT_MQTT = 10
- MQCHT_AMQP = 11 |
So, technically speaking, assuming zero-based, your string array should be:
Code: |
String[] chTypeText = {"", "SENDER", "SERVER", "RECEIVER", "REQUESTER", "ALL", "CLNTCONN", "SVRCONN", "CLUSRCVR", "CLUSSDR", "MQTT", "AMQP"}; |
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
markt |
Posted: Fri Sep 15, 2017 10:36 am Post subject: |
|
|
![](images/avatars/519b992c426bb0c8eac47.jpg) Knight
Joined: 14 May 2002 Posts: 504
|
To avoid the hardcoded text in your program, I'd use something like MQConstants.lookup(value, "MQCHT_.*"). |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
Steve Coleman |
Posted: Fri Sep 15, 2017 10:54 am Post subject: |
|
|
Newbie
Joined: 15 Sep 2017 Posts: 3
|
Thanks Roger. Appreciate the advice. I'm new to PCF and the example I found for those values was what I posted. Your update is spot on. A bit difficult to find to PCF examples. I like the examples on Capitalware. |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
gbaddeley |
Posted: Sun Sep 17, 2017 5:08 pm Post subject: |
|
|
![](images/avatars/gallery/Star Wars/movie_star_wars_yoda.gif) Jedi
Joined: 25 Mar 2003 Posts: 2499 Location: Melbourne, Australia
|
In MQ v8 there is a new C/C++ header file cmqstrc.h that has functions for mapping integer values to constant strings. The MQCHT_STR function returns "MQCHT_SVRCONN" for value 7. _________________ Glenn |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
|
|
![Reply to topic](templates/DAJ_Glass/images/lang_english/reply.gif) |
|
Page 1 of 1 |
|
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
|
|
|
|