Author |
Message
|
notoneword |
Posted: Fri Jul 08, 2011 5:40 am Post subject: JMS: How to write properties |
|
|
 Apprentice
Joined: 17 May 2011 Posts: 37
|
Ok, so in these forums lately I've been bringing up some various issues I've had lately with using the Java/MQ API to write RFH2 headers. Invariably the answer is 'Use JMS!'
I'm finally ready to give up and give it a try.
What I'm hoping I can do is somehow use the JMS classes to write properties to a 'normal' message and put it to a queue. In other words, is there a way to do this not involving supplying a JMS connection/session/etc? Or is all that required? In other words, how much can I use of the JMS API w/o buying into all of it?
I've been googling a bit, but if anyone has some good links with examples to do what I wish, please let me know.
thanks,
Tom |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jul 08, 2011 6:21 am Post subject: Re: JMS: How to write properties |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
notoneword wrote: |
In other words, how much can I use of the JMS API w/o buying into all of it?  |
So having decided to give up and not reinvent the wheel, you're still keen to just use the rim and see what kind of spokes you can come up with yourself?
Perhaps if you explained a little more about what problems using JMS sessions and connections would cause you, we could identify an alternative direction? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jul 08, 2011 6:47 am Post subject: Re: JMS: How to write properties |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Vitor wrote: |
notoneword wrote: |
In other words, how much can I use of the JMS API w/o buying into all of it?  |
So having decided to give up and not reinvent the wheel, you're still keen to just use the rim and see what kind of spokes you can come up with yourself?
Perhaps if you explained a little more about what problems using JMS sessions and connections would cause you, we could identify an alternative direction? |
Showing off again your little knowledge of Java?
@notoneword: You either use the Java "base" API and in V7 you don't have to set the properties on an RFH header, or you use the JMS classes. There is no hybrid. I would encourage you to look at the sun JMS tutorial. It's quite good.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jul 08, 2011 6:51 am Post subject: Re: JMS: How to write properties |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
fjb_saper wrote: |
Showing off again your little knowledge of Java? |
Yeah - even I know you can't mix & match methods. Either you go native or you use JMS.
Don't hold your breath waiting for me to explain how to do either in code with any degree of detail.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
notoneword |
Posted: Fri Jul 08, 2011 7:05 am Post subject: |
|
|
 Apprentice
Joined: 17 May 2011 Posts: 37
|
I knew I was asking the right people..
I've no problem with spokes and wheels, I just know little about JMS (and I'll check out that tutorial thanks) and am trying to figure out the best way to integrate with the code I already have in place. Sounds like full-on JMS is required when properties are involved, thanks.
.. and I didn't ask anyone to explain how to do anything in detail, but thanks for not offering  |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jul 08, 2011 8:14 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
|
Back to top |
|
 |
notoneword |
Posted: Fri Jul 08, 2011 11:28 am Post subject: |
|
|
 Apprentice
Joined: 17 May 2011 Posts: 37
|
Thanks for the links, I'm sure they'll come in handy! |
|
Back to top |
|
 |
mvic |
Posted: Fri Jul 08, 2011 1:46 pm Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
notoneword wrote: |
I just know little about JMS (and I'll check out that tutorial thanks) and am trying to figure out the best way to integrate with the code I already have in place. Sounds like full-on JMS is required when properties are involved, thanks. |
There is sample JMS app code with an MQ installation.
In my installation I have:
JmsConsumer.java
JmsProducer.java
JmsBrowser.java
... among others.
As I think has already been said, you also might get what you need using MQ V7 get/set property methods on the plain Java classes, if you have some reason to want not to use JMS. |
|
Back to top |
|
 |
|