Author |
Message
|
hi.riyazkhan |
Posted: Mon Aug 27, 2012 2:13 am Post subject: Query for Moving from non-SSL to SSL MQ connection |
|
|
Newbie
Joined: 18 Jul 2012 Posts: 7
|
Hi,
I have implemented a code for non-SSL MQ connection, which worked fine for communication between WAS and WMQ. now I want to do the same for SSL connection.
Now the issue is initially I had used Websphere specific APIs i.e. MQConnection, JMSTextMessage etc. Now to move to SSL we have a JNDI connection and will require completely generics code. Which means I have to write normal JMS code.
so I have 3 queries here
1) Do I need to change just Connection related classes i.e. Session, connection, etc or message classes as well, i.e. Sender, Message, Queue etc.
2) Will setting string properties to generics TextMessage (i.e. using setStringProperty() ) will set the property value in <usr> folder of RFH2 header automatically?
3) If down the line the middleware changes and I change only JNDI objects in WAS, then will my code work perfectly as it is Generics JMS code or will I have to modify app code as well?? |
|
Back to top |
|
 |
Vitor |
Posted: Mon Aug 27, 2012 2:25 am Post subject: Re: Query for Moving from non-SSL to SSL MQ connection |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
hi.riyazkhan wrote: |
Now the issue is initially I had used Websphere specific APIs i.e. MQConnection, JMSTextMessage etc. Now to move to SSL we have a JNDI connection and will require completely generics code. Which means I have to write normal JMS code. |
Why didn't you use the generic classes in the first place? What was the requirement to use the specifics (which is not best practice)? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
hi.riyazkhan |
Posted: Mon Aug 27, 2012 4:32 am Post subject: |
|
|
Newbie
Joined: 18 Jul 2012 Posts: 7
|
@Vitor
As a requirement I had to add some properties explicitly to exactly <usr> folder of RFH2 header of the message (whiche are very specific to IBM MQ).
And as I followed IBM documentation the best way I found was to add them to IBM specific message. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Aug 27, 2012 4:53 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
hi.riyazkhan wrote: |
As a requirement I had to add some properties explicitly to exactly <usr> folder of RFH2 header of the message (whiche are very specific to IBM MQ). |
Which ones? The usr folder of the RFH2 maps directly to the JMS user properties.
hi.riyazkhan wrote: |
as I followed IBM documentation the best way I found was to add them to IBM specific message |
Post the link. You've already been told here to use the generic objects so I'm interested to know which piece of IBM documentation is pointing you at the specific API. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
hi.riyazkhan |
Posted: Mon Aug 27, 2012 5:14 am Post subject: |
|
|
Newbie
Joined: 18 Jul 2012 Posts: 7
|
Yes, I followed the same instructions by you and Grand Master to use generics, and just wanted to clarify the queries in this post.
And as far as Documentation is concerned, I followed IBM redbook in which I found the JMSTextMesage class's API to set the values in usr folder of RFH2.
And to be frank I wasn't aware of best practices as I am new to JMS. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Aug 27, 2012 5:20 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
hi.riyazkhan wrote: |
I followed IBM redbook in which I found the JMSTextMesage class's API to set the values in usr folder of RFH2. |
Which redbook? Did you find the description in the actual WMQ InfoCenter of how application defined JMS properties are handled unconvincing? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Aug 27, 2012 5:21 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
hi.riyazkhan wrote: |
Yes, I followed the same instructions by you and Grand Master to use generics, and just wanted to clarify the queries in this post. |
And as you were told in the previous post "Grand Master" is a title not a name.
If you're reading the advice with as much care this is all going to take a very long time. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Aug 27, 2012 6:04 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
The only things you need to change between normal and SSL connection are the properties on the connection factory. If you use JNDI no code needs to be changed at all...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|