ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » JMS: How to write properties

Post new topic  Reply to topic
 JMS: How to write properties « View previous topic :: View next topic » 
Author Message
notoneword
PostPosted: Fri Jul 08, 2011 5:40 am    Post subject: JMS: How to write properties Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Fri Jul 08, 2011 6:21 am    Post subject: Re: JMS: How to write properties Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Fri Jul 08, 2011 6:47 am    Post subject: Re: JMS: How to write properties Reply with quote

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
View user's profile Send private message Send e-mail
Vitor
PostPosted: Fri Jul 08, 2011 6:51 am    Post subject: Re: JMS: How to write properties Reply with quote

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
View user's profile Send private message
notoneword
PostPosted: Fri Jul 08, 2011 7:05 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Fri Jul 08, 2011 8:14 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Other sources of JMS knowledge:

ebook tutorial

http://www.javagenious.com/Java-Tutorial/Java/Introduction_to_Java_Message_Service_JMS

http://www.java2s.com/Code/Java/J2EE/DemonstratesasimpleendtoendHelloWorldJMSexamplethatcanbecompiledandrunwiththeSunJavatmSystemMessageQueueproduct.htm
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
notoneword
PostPosted: Fri Jul 08, 2011 11:28 am    Post subject: Reply with quote

Apprentice

Joined: 17 May 2011
Posts: 37

Thanks for the links, I'm sure they'll come in handy!
Back to top
View user's profile Send private message
mvic
PostPosted: Fri Jul 08, 2011 1:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » JMS: How to write properties
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.