Author |
Message
|
nicomede |
Posted: Wed Apr 21, 2004 4:36 am Post subject: want a JMS message without header |
|
|
Newbie
Joined: 09 Jul 2003 Posts: 7
|
Hello,
Is it possible to generate a MQ message using a TextMessage of JMS but WITHOUT the header ? The JMS header is a property of the subclass Message.
Thank you for your answers !
N.D. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Apr 21, 2004 4:37 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Yes.
Change the destination so that it is an MQ destination instead of a JMS destination. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
nicomede |
Posted: Wed Apr 21, 2004 4:51 am Post subject: JMS Message without header |
|
|
Newbie
Joined: 09 Jul 2003 Posts: 7
|
Thanks for answering so quickly !
I forgot to specify that I don't use JNDI (wich seems to be very common).
I could I specify that my destination should be a MQ one ?
Thanks !
N.D. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Apr 21, 2004 4:57 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You're still using Destination objects - or you aren't using JMS.
The targetClient property applies to any Destination object, regardless of whether you use JNDI to find that Destination object or not. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
bower5932 |
Posted: Wed Apr 21, 2004 6:57 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
You can definitely do it in the code:
Code: |
import com.ibm.mq.jms.*;
...
Queue srvQueue;
...
srvQueue = (Queue)ctx.lookup("srvQueueName");
((MQQueue)srvQueue).setTargetClient(JMSC.MQJMS_CLIENT_NONJMS_MQ);
|
However, this now relies on a provider specific attribute. You're better off making the change to the JNDI entry so that your code will be provider neutral. |
|
Back to top |
|
 |
|