Author |
Message
|
ovasquez |
Posted: Wed Dec 14, 2005 7:37 pm Post subject: send Message a Format MQSTR, JMS |
|
|
 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 |
|
 |
webspherical |
Posted: Wed Dec 14, 2005 7:41 pm Post subject: |
|
|
Acolyte
Joined: 15 Aug 2005 Posts: 50
|
change TARGET CLIENT to MQ instead of JMS and it will strip the RFH2. |
|
Back to top |
|
 |
wschutz |
Posted: Wed Dec 14, 2005 7:46 pm Post subject: |
|
|
 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 |
|
 |
ovasquez |
Posted: Wed Dec 14, 2005 8:12 pm Post subject: |
|
|
 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 |
|
 |
EddieA |
Posted: Wed Dec 14, 2005 8:19 pm Post subject: |
|
|
 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 |
|
 |
ovasquez |
Posted: Wed Dec 14, 2005 8:30 pm Post subject: |
|
|
 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 |
|
 |
fjb_saper |
Posted: Wed Dec 14, 2005 8:34 pm Post subject: |
|
|
 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 |
|
 |
ovasquez |
Posted: Wed Dec 14, 2005 8:40 pm Post subject: |
|
|
 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 |
|
 |
bower5932 |
Posted: Thu Dec 15, 2005 7:14 am Post subject: |
|
|
 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 |
|
 |
|