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 » General IBM MQ Support » Documentation for usage of MQ Java MQCIH, MQIIH... classes

Post new topic  Reply to topic
 Documentation for usage of MQ Java MQCIH, MQIIH... classes « View previous topic :: View next topic » 
Author Message
RogerLacroix
PostPosted: Wed Jan 28, 2015 9:56 am    Post subject: Documentation for usage of MQ Java MQCIH, MQIIH... classes Reply with quote

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
View user's profile Send private message Visit poster's website
mqjeff
PostPosted: Wed Jan 28, 2015 10:12 am    Post subject: Reply with quote

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
View user's profile Send private message
RogerLacroix
PostPosted: Wed Jan 28, 2015 10:27 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

mqjeff wrote:
Use the MQHeaderList's write method to serialize the headers into the message. Write the contents of the message. Send the message.

Where is this documented? Link, please. Also, what about generating a message with multiple MQ headers? i.e. MQDLH and MQRFH2

Also, at this link, it says: 'You can create Java classes for header types not supplied with WebSphere MQ classes for Java.'
http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.dev.doc/q030970_.htm

That's great but how do you get MQ (i.e. I guess MQHeaderList) to recognize it? i.e. If you did the 'Print all headers' example at http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.dev.doc/q030890_.htm

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
RogerLacroix
PostPosted: Wed Jan 28, 2015 10:31 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
mqjeff
PostPosted: Wed Jan 28, 2015 10:47 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Wed Jan 28, 2015 9:21 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

RogerLacroix wrote:
mqjeff wrote:
Use the MQHeaderList's write method to serialize the headers into the message. Write the contents of the message. Send the message.

Where is this documented? Link, please. Also, what about generating a message with multiple MQ headers? i.e. MQDLH and MQRFH2

Also, at this link, it says: 'You can create Java classes for header types not supplied with WebSphere MQ classes for Java.'
http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.dev.doc/q030970_.htm

That's great but how do you get MQ (i.e. I guess MQHeaderList) to recognize it? i.e. If you did the 'Print all headers' example at http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.dev.doc/q030890_.htm

Regards,
Roger Lacroix
Capitalware Inc.

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Documentation for usage of MQ Java MQCIH, MQIIH... classes
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.