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 » IBM MQ Java / JMS » want a JMS message without header

Post new topic  Reply to topic
 want a JMS message without header « View previous topic :: View next topic » 
Author Message
nicomede
PostPosted: Wed Apr 21, 2004 4:36 am    Post subject: want a JMS message without header Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Wed Apr 21, 2004 4:37 am    Post subject: Reply with quote

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
View user's profile Send private message
nicomede
PostPosted: Wed Apr 21, 2004 4:51 am    Post subject: JMS Message without header Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Wed Apr 21, 2004 4:57 am    Post subject: Reply with quote

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
View user's profile Send private message
bower5932
PostPosted: Wed Apr 21, 2004 6:57 am    Post subject: Reply with quote

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

MQSeries.net Forum Index » IBM MQ Java / JMS » want a JMS message without header
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.