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 » How to remove MQMD from message in Java compute node

Post new topic  Reply to topic
 How to remove MQMD from message in Java compute node « View previous topic :: View next topic » 
Author Message
CuriCAT
PostPosted: Fri Oct 27, 2006 1:36 am    Post subject: How to remove MQMD from message in Java compute node Reply with quote

Voyager

Joined: 26 Sep 2006
Posts: 82

How to remove MQMD from message in Java compute node:

When I execute following code.. it gives me com.ibm.broker.plugin.MbReadOnlyMessageException

MbMessage inMessage = assembly.getMessage();
MbElement rootElement = inMessage.getRootElement();
MbElement mqmdElement= rootElement.getFirstElementByPath("/MQMD");
mqmdElement.detach();

I understand that it is input message we can not modify that, but when I copy of that message into another object I should be able to do
Why I am not able to, How can I achieve this.

Please help me.

Thanks
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
jefflowrey
PostPosted: Fri Oct 27, 2006 1:46 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ac30200_.htm
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kadzo
PostPosted: Tue Oct 31, 2006 3:22 am    Post subject: Reply with quote

Newbie

Joined: 04 Jul 2005
Posts: 5

Bloody hell, Jefflowrey stop posting what i call a stupid response . Putting a link is not a response .

This is a response ganeshgurukkal , try to replace

MbMessage inMessage = assembly.getMessage();

with

MbMessage inMessage = new MbMessage(assembly.getMessage());
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Oct 31, 2006 4:17 am    Post subject: Reply with quote

Grand High Poobah

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

Poking a little bit around the link jeff provided you would have found on your own : how to copy a message in a java compute node

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Tue Oct 31, 2006 4:34 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

kadzo wrote:
Bloody hell, Jefflowrey stop posting what i call a stupid response . Putting a link is not a response .


Quote:
kadzo
newbie


Joined: 04 Jul 2005
Posts: 5


Quote:
jefflowrey
grand master


Joined: 16 Oct 2002
Posts: 11840


Quote:
Grand Master just means "posts too much"


http://www.mqseries.net/phpBB2/viewtopic.php?t=22295
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Oct 31, 2006 4:44 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kadzo wrote:
Bloody hell, Jefflowrey stop posting what i call a stupid response . Putting a link is not a response .


Putting a link is a perfectly valid response, especially when the alternative is to retype material easily available via said link.

And a "stupid" response of this kind is valid where the question can be answered via a search of this site and / or the supplied documentation!

If the poster has failed to find either the search button or the correct part of the documentation, providing a link to it is a helpful action.

Disclaimer - I'm a member of the RTFM school of thought and therefore subject to bias.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
CuriCAT
PostPosted: Wed Nov 01, 2006 2:04 am    Post subject: Reply with quote

Voyager

Joined: 26 Sep 2006
Posts: 82

Thanks kadzo, You are right!!

Most of the information related to Message broker available in the information centre and there are number of pdfs in the IBM Read books.

Does that mean, Do every one know about everything ?

When some body asks the question, so you provide information centre (home) link and IBM Read books like, is it ? and say that Go and search there you will get it.

I agree, may be a grand master can do that. for newbie like me it is tough to interpret the code in a right context, even the inforamation is available right infront of us, thats why we would like to clarify with people who have experienced already, provided if they have time and would like to answere.

FUY: We do read things and try to solve it by ourself, if we are not getting the concept or stuck so we come seek help here, mostrly I will try to avoid that also in future, try to solve myself even it takes longer time .

And have, Thank you people for your response.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Vitor
PostPosted: Wed Nov 01, 2006 2:21 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

ganeshgurukkal wrote:
try to solve myself even it takes longer time


And so you will learn. Experience is built on a foundation of mistakes from bricks of trial and error.

ganeshgurukkal wrote:
Thank you people for your response.


You're quite welcome.

For the record: "Grand Master" (or Grand Poobah) is a measure of the number of posts, i.e. the number of times an individual has attempted to provide assistance, and does not have anything to do with knowledge or experience per se. Many "Masters" in here have far greater MQ wisdom than me and I'm certainly not afraid to post a question when I get stuck.

Speaking personally I'd sooner be pointed to the relevant section in the documentation for a question of pure fact or method and obtain the IBM view. Where opinion scores is for subjective questions: high availability, performance, scaleability of a given solution where there is no "right" answer but a sliding scale of desireable solutions.

But that's just me.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Nov 01, 2006 2:51 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

If you've read the documentation, you need to say so.

Many people come in and ask questions that are directly answered by the documentation, and haven't read the documentation or even know that it might answer their question.

We only know what you tell us. So if you've read the specific page in the Info Center on creating a new message, and you didn't understand it... and you don't want to get an answer that points you back to that page... then you should explain what you've already done.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
CuriCAT
PostPosted: Wed Nov 01, 2006 4:16 am    Post subject: Reply with quote

Voyager

Joined: 26 Sep 2006
Posts: 82

I am sorry jefflowrey, that's my mistake.

You are really contributing by answering questions.

I also read that "How To Ask Questions The Smart Way", I felt guilty, feel like taking over advantage of you people:cry:

I will try to avoid in the future, do rectify problems myself, if not will come to MQSeries.net.

Thanks jefflowrey, looking for your and others continuous support.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to remove MQMD from message in Java compute node
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.