Author |
Message
|
ninjahatodi |
Posted: Tue Jan 02, 2018 1:59 am Post subject: Weblogic MQ integration |
|
|
Novice
Joined: 02 Apr 2009 Posts: 12
|
We are replacing websphere application server with weblogic in our existing application. This J2EE application used to send MQ message to another application. On WAS there is setting in Resources-> JMS -> Queue -> Select configured Queue Name - > Advanced Properties -> Message Format -> Apply RFH version 2 header to message sent to this Destination -> Message Body -> MQ. This ensures message is sent in MQSTR format to destination.
What is similar setting we can do in Weblogic to deliver this message in MQSTR format ?
Is there any way we can set this thing in java program so don't have to depend on settings at application server ?
We have already tried following options
2. (MQQueue) responseQueueInfo.setTargetClient(1);
1. (TextMessage) textMessage.setStringProperty("JMS_IBM_Format", "MQSTR");
I would really appericiate any help as there is not much i could get on google. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Jan 02, 2018 3:31 am Post subject: Re: Weblogic MQ integration |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
ninjahatodi wrote: |
We are replacing websphere application server with weblogic in our existing application. This J2EE application used to send MQ message to another application. On WAS there is setting in Resources-> JMS -> Queue -> Select configured Queue Name - > Advanced Properties -> Message Format -> Apply RFH version 2 header to message sent to this Destination -> Message Body -> MQ. This ensures message is sent in MQSTR format to destination.
What is similar setting we can do in Weblogic to deliver this message in MQSTR format ?
Is there any way we can set this thing in java program so don't have to depend on settings at application server ?
We have already tried following options
2. (MQQueue) responseQueueInfo.setTargetClient(1);
1. (TextMessage) textMessage.setStringProperty("JMS_IBM_Format", "MQSTR");
I would really appreciate any help as there is not much i could get on google. |
Neither option should be necessary.
The sending party should determine the JMSReplyTo destination. At that point the Destination should already have been "decorated with that information" (example)
Code: |
Session.createQueue("queue:///<queuename>?targetClient=1"); |
This would then be passed when you set the Destination from the JMSReplyTo...
As for the format, just the fact that you are using a TextMessage should set the JMS_IBM_Format to MQConstants.MQFMT_STRING (which is not the same as "MQSTR" but more like "MQSTR "....
Don't forget to create the response message as a text message
Code: |
TextMessage respmsg = session.createTextMessage(); |
Hope this helps  _________________ MQ & Broker admin |
|
Back to top |
|
 |
zpat |
Posted: Tue Jan 02, 2018 3:45 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
You can set the target as non-JMS in several ways, including in the Java code, or in the MQ URI. _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error. |
|
Back to top |
|
 |
ninjahatodi |
Posted: Thu Jan 04, 2018 11:40 pm Post subject: Re: Weblogic MQ integration |
|
|
Novice
Joined: 02 Apr 2009 Posts: 12
|
fjb_saper wrote: |
ninjahatodi wrote: |
We are replacing websphere application server with weblogic in our existing application. This J2EE application used to send MQ message to another application. On WAS there is setting in Resources-> JMS -> Queue -> Select configured Queue Name - > Advanced Properties -> Message Format -> Apply RFH version 2 header to message sent to this Destination -> Message Body -> MQ. This ensures message is sent in MQSTR format to destination.
What is similar setting we can do in Weblogic to deliver this message in MQSTR format ?
Is there any way we can set this thing in java program so don't have to depend on settings at application server ?
We have already tried following options
2. (MQQueue) responseQueueInfo.setTargetClient(1);
1. (TextMessage) textMessage.setStringProperty("JMS_IBM_Format", "MQSTR");
I would really appreciate any help as there is not much i could get on google. |
Neither option should be necessary.
The sending party should determine the JMSReplyTo destination. At that point the Destination should already have been "decorated with that information" (example)
Code: |
Session.createQueue("queue:///<queuename>?targetClient=1"); |
This would then be passed when you set the Destination from the JMSReplyTo...
As for the format, just the fact that you are using a TextMessage should set the JMS_IBM_Format to MQConstants.MQFMT_STRING (which is not the same as "MQSTR" but more like "MQSTR "....
Don't forget to create the response message as a text message
Code: |
TextMessage respmsg = session.createTextMessage(); |
Hope this helps  |
Quote: |
Session.createQueue("queue:///<queuename>?targetClient=1");
This does not work. We are already using TextMessage. Any thing else we might be mising? |
|
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jan 05, 2018 10:59 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Please define does not work... Are the cryer monkeys coming a howling??
What was the expect result, what was the effective result?
Yes there is a setting in the connection factory related to targetClient which tells it to keep the targetClient of the calling party....
But apart from that no..., unless you are doing something very unorthodoxal....  _________________ MQ & Broker admin |
|
Back to top |
|
 |
ninjahatodi |
Posted: Mon Jan 08, 2018 3:12 am Post subject: |
|
|
Novice
Joined: 02 Apr 2009 Posts: 12
|
fjb_saper wrote: |
Please define does not work... Are the cryer monkeys coming a howling??
What was the expect result, what was the effective result?
Yes there is a setting in the connection factory related to targetClient which tells it to keep the targetClient of the calling party....
But apart from that no..., unless you are doing something very unorthodoxal....  |
Quote: |
You are answering question you think I am asking and not the one being asked. I want you to get that setting targetClient did not had desired effect of sending the data in MQSTR format. We were able to send the data in MQSTR format with below settings.
com.ibm.mq.jms.MQQueue("queue://XXXXXXXX.RQ?persistence=-1&targetClient=1");
Hope you get it and you get gotten by it.
|
|
|
Back to top |
|
 |
|