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 » Java compute node , copy entire message

Post new topic  Reply to topic
 Java compute node , copy entire message « View previous topic :: View next topic » 
Author Message
KIT_INC
PostPosted: Wed Feb 22, 2017 11:58 am    Post subject: Java compute node , copy entire message Reply with quote

Knight

Joined: 25 Aug 2006
Posts: 589

I am a WMB administrator with no development knowledge. I am testing message flow monitoring with a flow that contains many different type of nodes. The very basic test is to make sure an event generated when a message arrived to a node. So all I need is as simple as passing a message straight through the node. In the flow I have compute node and Java compute node and many others. I have no problem with compute node because it has the CopyEntireMessage(). All I need is just to un-comment the ESQL. But I cannot find the equivalent in the JCN. I follow the wizard, select Creating message class and get to the skeleton code
Code:
// create new empty message
      MbMessage outMessage = new MbMessage();
      MbMessageAssembly outAssembly = new MbMessageAssembly(contact admin,
            outMessage);

      try {
         // optionally copy message headers
         copyMessageHeaders(inMessage, outMessage);
         // ----------------------------------------------------------
         // Add user code below

         // End of user code
         // ----------------------------------------------------------


What should I put after Add user code below to get the equivalent of
CopyEntireMessage() as in regular compute node.

I use a simple flow for testing
MQINPUT -->JCN--> MQOUTPUT

I only get the MQMD if I do not add any code or if I just add the line outMessage = inMessage; (get this line by looking through this forum)

I am not a developer and do not know Java. I need some one who can help me out with this.

The code has to work with blob message also
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Feb 22, 2017 2:01 pm    Post subject: Reply with quote

Grand High Poobah

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

You followed the wrong wizard. Try following the one about changing / modifying the message
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Thu Feb 23, 2017 5:20 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Try reviewing the javadocs on constructors for MBMessage.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
KIT_INC
PostPosted: Thu Feb 23, 2017 5:56 am    Post subject: Reply with quote

Knight

Joined: 25 Aug 2006
Posts: 589

Thanks fjb_saper, that works. I don't even have to add any code.

Thanks mqjeff for pointing out the Javadoc. I will try to read that when I have some time for my learning purpose. BTW , the javadoc you refer to is it in the infocenter or it is somewhere in the install path ?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Feb 23, 2017 6:35 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

KIT_INC wrote:
BTW , the javadoc you refer to is it in the infocenter or it is somewhere in the install path ?


sort of both. If you have the local help installed/started/ then it's there, otherwise - https://www.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/as07392_.htm and click on "Java user-defined extensions API"

finding and using Javadocs is vital to using Java in general. So you should get familiar with it very early in your learning.
_________________
chmod -R ugo-wx /
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 » Java compute node , copy entire message
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.