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 » send Message a Format MQSTR, JMS

Post new topic  Reply to topic
 send Message a Format MQSTR, JMS « View previous topic :: View next topic » 
Author Message
ovasquez
PostPosted: Wed Dec 14, 2005 7:37 pm    Post subject: send Message a Format MQSTR, JMS Reply with quote

Centurion

Joined: 09 Dec 2005
Posts: 141
Location: Lima, Peru

Hi
I have aplicacin that writes messages in queues of Websphere MQ 5,3, use API JMS, but when I review the format of the message is MQHRF2, as I can write messages in format MQSTR ?
thanks!!!

example:
************
MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
factory.setTransportType(JMSC.MQJMS_CLIENT_NONJMS_MQ);
factory.setQueueManager("QMBK1");
factory.setHostName("server78");

QueueConnection connection = factory.createQueueConnection();
connection.start();
QueueSession session =
connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);

Queue queue = session.createQueue("queue17");
QueueSender sender = session.createSender(queue);
TextMessage msg=session.createTextMessage("test_test");
sender.send(msg);
****************
_________________
Oscar Vásquez Flores
Back to top
View user's profile Send private message Send e-mail
webspherical
PostPosted: Wed Dec 14, 2005 7:41 pm    Post subject: Reply with quote

Acolyte

Joined: 15 Aug 2005
Posts: 50

change TARGET CLIENT to MQ instead of JMS and it will strip the RFH2.
Back to top
View user's profile Send private message
wschutz
PostPosted: Wed Dec 14, 2005 7:46 pm    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

If memory serves, you want to set TARGCLIENT to 'MQ' in the qcf definition. That should produce a message without the RFH headers.
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
ovasquez
PostPosted: Wed Dec 14, 2005 8:12 pm    Post subject: Reply with quote

Centurion

Joined: 09 Dec 2005
Posts: 141
Location: Lima, Peru

please, what class / method ..¿?
set TARGET CLIENT MQ}

MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
factory.setXXXX ..¿?

thanks
_________________
Oscar Vásquez Flores
Back to top
View user's profile Send private message Send e-mail
EddieA
PostPosted: Wed Dec 14, 2005 8:19 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

What is the receiving application. If that's using JMS, then leave everything alone. It'll work.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
ovasquez
PostPosted: Wed Dec 14, 2005 8:30 pm    Post subject: Reply with quote

Centurion

Joined: 09 Dec 2005
Posts: 141
Location: Lima, Peru

My application of reception is a Program Cobol CICS in z/OS
_________________
Oscar Vásquez Flores
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Wed Dec 14, 2005 8:34 pm    Post subject: Reply with quote

Grand High Poobah

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

Use the URI format to define the queue and its attributes:
Code:
Queue queue = session.createQueue("queue:///queue17?targetClient=1");

usually the queue name would be in caps:
Quote:
"queue:///QUEUE17?targetClient=1"


Enjoy
Back to top
View user's profile Send private message Send e-mail
ovasquez
PostPosted: Wed Dec 14, 2005 8:40 pm    Post subject: Reply with quote

Centurion

Joined: 09 Dec 2005
Posts: 141
Location: Lima, Peru

Perfect!!!, thanks fjb_saper,
thanks to all for its support!!!!
_________________
Oscar Vásquez Flores
Back to top
View user's profile Send private message Send e-mail
bower5932
PostPosted: Thu Dec 15, 2005 7:14 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

A second method for setting it:

((MQQueue)srvQueue).setTargetClient(JMSC.MQJMS_CLIENT_NONJMS_MQ);
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 » send Message a Format MQSTR, JMS
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.