|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Clarification on JMS |
« View previous topic :: View next topic » |
Author |
Message
|
drab |
Posted: Tue Sep 22, 2009 6:38 am Post subject: Clarification on JMS |
|
|
Newbie
Joined: 21 Sep 2009 Posts: 7
|
Hi, I have a question regarding the whole JMS architecture. How come there are two different ways to do things? For example how come there are:
MQQueueConnectionFactory and QueueConnectionFactory? I understand that one is IBM, but what are the differences?
Can I develop an application that mixes both methods, or do I have to stick to one?
Also:
If I am using the 'MQ' method, and using get and put to retrieve and submit messages into a queue, and I am using the CLIENT_ACKNOWLEDGE mode, how can I acknowledge that the message has been received? I don't see an acknowledge method in the MQMessage. (I do however see it in JMSMessage, but I am not sure how to convert MQMessage to a JMSMessage).
Thanks for clearing things up for me!  |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Tue Sep 22, 2009 7:24 am Post subject: Re: Clarification on JMS |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
drab wrote: |
Hi, I have a question regarding the whole JMS architecture. How come there are two different ways to do things? For example how come there are:
MQQueueConnectionFactory and QueueConnectionFactory? I understand that one is IBM, but what are the differences?
|
One is a specification and one is IBM specific. The JMS approach will allow you to easily migrate your code to any other jms compliant products without changing your code.
Quote: |
Can I develop an application that mixes both methods, or do I have to stick to one?
|
Yeah you could, but I really wouldnt. You'll have twice as much infrastructure code than is needed. Its like duplicating code that interfaces to a DB, one that uses ODBC and the other that uses the suppliers specific drivers.
Quote: |
Also:
If I am using the 'MQ' method, and using get and put to retrieve and submit messages into a queue, and I am using the CLIENT_ACKNOWLEDGE mode, how can I acknowledge that the message has been received? I don't see an acknowledge method in the MQMessage. (I do however see it in JMSMessage, but I am not sure how to convert MQMessage to a JMSMessage).
|
First, id question this to see if its really a requirement. Why do you need to do this? |
|
Back to top |
|
 |
drab |
Posted: Tue Sep 22, 2009 7:33 am Post subject: |
|
|
Newbie
Joined: 21 Sep 2009 Posts: 7
|
It is a requirement, there are specific things I would like to handle when I acknowledge the message. I have however come up with a work around.
Since I only needed the MQ to create a dynamic queue, I used the MQ libraries for that part. I then used the JMS approach to open the dynamically created queue and manipulate it however I want (clientmode_acknowledge). Is this approach bad? Is there a better way of doing things? Thank you. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Sep 22, 2009 9:14 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
drab wrote: |
It is a requirement, there are specific things I would like to handle when I acknowledge the message. I have however come up with a work around.
Since I only needed the MQ to create a dynamic queue, I used the MQ libraries for that part. I then used the JMS approach to open the dynamically created queue and manipulate it however I want (clientmode_acknowledge). Is this approach bad? Is there a better way of doing things? Thank you. |
Use JMS only, have your session transacted and autoacknowledged and deal with everything inside the transaction/session. When you commit the session the message will be gone and the work on the DB committed...
In other words, simply follow the J2EE model!  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|