|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Documentation for usage of MQ Java MQCIH, MQIIH... classes |
« View previous topic :: View next topic » |
Author |
Message
|
RogerLacroix |
Posted: Wed Jan 28, 2015 9:56 am Post subject: Documentation for usage of MQ Java MQCIH, MQIIH... classes |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
All,
I want to use the new MQ Java MQCIH, MQIIH, MQDLH, etc... classes rather than my own MQCIH, MQIIH, MQDLH, etc... classes that I wrote many, many years ago. I like to beat myself up for no apparent reason.
I've gone through the MQ JavaDocs and to put it as politely as possible, they are terrible. I looked at both MQ v7.5 & v8 JavaDocs. I also looked in the MQ Knowledge Center and it has the same information. Under description for MQCIH, someone cut & pasted the "struct tagMQCIH" from the cmqc.h file. Where is the proper description and the use cases for both (1) creating a MQCIH and putting a message to a queue and (2) getting a message from a queue and using the MQCIH class.
It is the same for all of the new classes MQIIH, MQDLH, MQTM, MQTMC2, MQXQH, MQRFH, etc..
I did find the following in the MQ Knowledge Center which helped a little:
http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.dev.doc/q030880_.htm?lang=en
Where is this stuff documented? Any tips or tricks would be greatly appreciated.
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jan 28, 2015 10:12 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Reading through the Javadoc, and scratching my head a bit, what it seems you need to do is this.
Use the default MQHeaderRegistry to get factories or otherwise to create header objects for the headers you want ( an MQCIH, for example).
Create an MQHeaderList object, and add the headers you've created to that list in the order you want them to appear in the message.
Create an MQMessage object. Use the MQHeaderList's write method to serialize the headers into the message. Write the contents of the message. Send the message.
the bit about "struct tagMQCIH" is not a copy/paste error, it's a documentation generation error. (The Javadocs are not created by hand, in other words). |
|
Back to top |
|
 |
RogerLacroix |
Posted: Wed Jan 28, 2015 10:27 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
|
Back to top |
|
 |
RogerLacroix |
Posted: Wed Jan 28, 2015 10:31 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
mqjeff wrote: |
the bit about "struct tagMQCIH" is not a copy/paste error, it's a documentation generation error. (The Javadocs are not created by hand, in other words). |
True. But it does mean that someone actually put the "struct tagMQCIH" in the MQCIH.java class file which the JavaDoc processor pickup when it ran. That falls into the category of NOT documenting your code.
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jan 28, 2015 10:47 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
RogerLacroix wrote: |
mqjeff wrote: |
the bit about "struct tagMQCIH" is not a copy/paste error, it's a documentation generation error. (The Javadocs are not created by hand, in other words). |
True. But it does mean that someone actually put the "struct tagMQCIH" in the MQCIH.java class file which the JavaDoc processor pickup when it ran. That falls into the category of NOT documenting your code. |
No. Not really. It means that something picks things up from the mq c header files and creates java code from them.
It's too regular for it to be a copy/paste error. Happens with all of the subclasses of MQHeader.
 |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jan 28, 2015 9:21 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
I guess if you want to create your own and use it in the MQHeaderList, it will have to follow a common MQHeader interface like toBytes gives you a byte stream for the object and fromBytes allows you to instanciate the object from a bytestream ?? (method names are as example only. You'll have to check for real method names on MQHeader interface...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|
|
 |
|
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
|
|
|
|