Author |
Message
|
CuriCAT |
Posted: Fri Oct 27, 2006 1:36 am Post subject: How to remove MQMD from message in Java compute node |
|
|
 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 |
|
 |
jefflowrey |
Posted: Fri Oct 27, 2006 1:46 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
kadzo |
Posted: Tue Oct 31, 2006 3:22 am Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Tue Oct 31, 2006 4:17 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Oct 31, 2006 4:34 am Post subject: |
|
|
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 |
|
 |
Vitor |
Posted: Tue Oct 31, 2006 4:44 am Post subject: |
|
|
 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 |
|
 |
CuriCAT |
Posted: Wed Nov 01, 2006 2:04 am Post subject: |
|
|
 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 |
|
 |
Vitor |
Posted: Wed Nov 01, 2006 2:21 am Post subject: |
|
|
 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 |
|
 |
jefflowrey |
Posted: Wed Nov 01, 2006 2:51 am Post subject: |
|
|
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 |
|
 |
CuriCAT |
Posted: Wed Nov 01, 2006 4:16 am Post subject: |
|
|
 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 |
|
 |
|