Author |
Message
|
amiivas |
Posted: Tue Aug 09, 2016 8:25 pm Post subject: Reading MQRFH2 usr folder in MDB |
|
|
Apprentice
Joined: 14 Oct 2007 Posts: 44 Location: Texas, USA
|
I have an requirement where I need to read custom name value in the usr folder of MQRFH2 header in an incoming message to a MDB running on JBOSS EAP 6.4 server. The message when viewed through RFHUTIL shows the usr folder with name value data but when the message is received as jms_text, it is not present in any of the header variable.
I am creating the message with MQRFH2 using IBM Datapower so I cannot set setStringProperty() in the outgoing TextMessage of the message producer.
1. Is there a way we can read MQRFH2 usr folder values in MDB ?
2 .Any other place in header section of a message where I can put this custom values?
3. Datapower can set string property in the outgoing JMSTextMessage? _________________ IBM WebSphere Certified Solution Developer |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Aug 10, 2016 3:44 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
amiivas |
Posted: Wed Aug 10, 2016 10:02 am Post subject: |
|
|
Apprentice
Joined: 14 Oct 2007 Posts: 44 Location: Texas, USA
|
Quote: |
http://www.ibm.com/support/knowledgecenter/en/SSFKSJ_8.0.0/com.ibm.mq.dev.doc/q022920_.htm |
The article says we can get the property by getStringProperty but when I am trying to debug or get the usr.property during runtime, I am not getting the value. I tried both message.getStringProperty() and message.getPropertyNames() to see if it at all has those values.
Is there a specific requirement done at JBOSS/MDB/activation-config level to read usr folder in MQRFH2.
Thanks. _________________ IBM WebSphere Certified Solution Developer |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Aug 10, 2016 3:29 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
amiivas wrote: |
Quote: |
http://www.ibm.com/support/knowledgecenter/en/SSFKSJ_8.0.0/com.ibm.mq.dev.doc/q022920_.htm |
The article says we can get the property by getStringProperty but when I am trying to debug or get the usr.property during runtime, I am not getting the value. I tried both message.getStringProperty() and message.getPropertyNames() to see if it at all has those values.
Is there a specific requirement done at JBOSS/MDB/activation-config level to read usr folder in MQRFH2.
Thanks. |
What is the name of the property your are setting?
What is the name of the property you are trying to read?
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
amiivas |
Posted: Sun Aug 14, 2016 3:47 pm Post subject: |
|
|
Apprentice
Joined: 14 Oct 2007 Posts: 44 Location: Texas, USA
|
The name of the property set is InterfaceName and the path of the property is MQMD.usr.InterfaceName.
I am trying to read
message.getStringProperty("InterfaceName");
I hv tried all other variant such as us.InterfaceName, interfaceName, etc and also debugged to find all property names in the message but it simply does not have any reference to the mqrfh2 or usr or the properties set in it. _________________ IBM WebSphere Certified Solution Developer |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Aug 14, 2016 8:48 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
amiivas wrote: |
The name of the property set is InterfaceName and the path of the property is MQMD.usr.InterfaceName.
I am trying to read
message.getStringProperty("InterfaceName");
I hv tried all other variant such as us.InterfaceName, interfaceName, etc and also debugged to find all property names in the message but it simply does not have any reference to the mqrfh2 or usr or the properties set in it. |
Did you set the destination type to JMS when creating the message?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
amiivas |
Posted: Thu Aug 18, 2016 3:57 pm Post subject: |
|
|
Apprentice
Joined: 14 Oct 2007 Posts: 44 Location: Texas, USA
|
That is the thing, I am creating message with MQRFH2 header in IBM Datapower using xslt by defining a MQMD and MQRFH2 xmls, serializing them and adding them as a header to outgoing request.
While reading the destinatiionType is set to javax.jms.Queue in the activiationconfig property. _________________ IBM WebSphere Certified Solution Developer |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Aug 18, 2016 5:27 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
amiivas wrote: |
The name of the property set is InterfaceName and the path of the property is MQMD.usr.InterfaceName.
I am trying to read
message.getStringProperty("InterfaceName");
I hv tried all other variant such as us.InterfaceName, interfaceName, etc and also debugged to find all property names in the message but it simply does not have any reference to the mqrfh2 or usr or the properties set in it. |
Surely that must be a typo and you meant to say you are setting MQRFH2.usr.InterfaceName and not MQMD.usr.InterfaceName ?? _________________ MQ & Broker admin |
|
Back to top |
|
 |
|