|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQQueueConnectionFactory vs MQConnectionFactory |
« View previous topic :: View next topic » |
Author |
Message
|
bobbee |
Posted: Thu Jan 07, 2021 7:01 am Post subject: MQQueueConnectionFactory vs MQConnectionFactory |
|
|
 Knight
Joined: 20 Sep 2001 Posts: 545 Location: Tampa
|
Client is asking the difference between these two. My J is weak. I searched, could not find and appropriate discussion |
|
Back to top |
|
 |
tczielke |
Posted: Thu Jan 07, 2021 10:07 am Post subject: |
|
|
Guardian
Joined: 08 Jul 2010 Posts: 941 Location: Illinois, USA
|
The differences have to do with the evolution of the JMS API through its different releases. This is a blurb from the JMS 2.0 specification:
Quote: |
JMS 1.0 defined two domain-specific APIs, one for point-to-point messaging (queues) and one for pub/sub (topics). Although these remain part of JMS for reasons of backwards compatibility they should be considered to be completely superseded by the later APIs.
JMS 1.1 introduced a new unified API which offered a single set of interfaces that could be used for both point-to-point and pub/sub messaging. This is referred to here as the classic API.
JMS 2.0 introduces a simplified API which offers all the features of the classic API but which requires fewer interfaces and is simpler to use. |
MQQueueConnectionFactory would be from the JMS 1.0 specification.
MQConnectionFactory would be from the JMS 1.1 specification.
Since the JMS specification says 1.0 is superseded by 1.1, MQConnectionFactory would be preferred.
For some reason that I am not aware of, IBM MQ chose not to provide an MQ class for the JMS 2.0 API equivalent here which would be a JMSContext. In other words, there is no MQJMSContext. So I use MQConnectionFactory when needing to get into the JMS MQ extension code, even when coding at JMS 2.0. _________________ Working with MQ since 2010. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jan 08, 2021 5:51 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
tczielke wrote: |
The differences have to do with the evolution of the JMS API through its different releases. This is a blurb from the JMS 2.0 specification:
Quote: |
JMS 1.0 defined two domain-specific APIs, one for point-to-point messaging (queues) and one for pub/sub (topics). Although these remain part of JMS for reasons of backwards compatibility they should be considered to be completely superseded by the later APIs.
JMS 1.1 introduced a new unified API which offered a single set of interfaces that could be used for both point-to-point and pub/sub messaging. This is referred to here as the classic API.
JMS 2.0 introduces a simplified API which offers all the features of the classic API but which requires fewer interfaces and is simpler to use. |
MQQueueConnectionFactory would be from the JMS 1.0 specification.
MQConnectionFactory would be from the JMS 1.1 specification.
Since the JMS specification says 1.0 is superseded by 1.1, MQConnectionFactory would be preferred.
For some reason that I am not aware of, IBM MQ chose not to provide an MQ class for the JMS 2.0 API equivalent here which would be a JMSContext. In other words, there is no MQJMSContext. So I use MQConnectionFactory when needing to get into the JMS MQ extension code, even when coding at JMS 2.0. |
There is an implementation of the JMSContext . You first create a JmsFactoryFatctory that you use to create the JmsConnectionFactory or JmsXAConnecionFactory which you then use to create the JMSContext... The implementing class seems to be com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl
Note you can also use the JmsConnectionFactory to create JMS 1.1 or JMS 1.0 artifacts as it also implements the MQConnectionFactory
As for support for the MQ Extensions look at https://www.ibm.com/support/knowledgecenter/SSFKSJ_9.2.0/com.ibm.mq.dev.doc/q119130_.html
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
tczielke |
Posted: Fri Jan 08, 2021 6:35 am Post subject: |
|
|
Guardian
Joined: 08 Jul 2010 Posts: 941 Location: Illinois, USA
|
fjb_saper wrote: |
tczielke wrote: |
The differences have to do with the evolution of the JMS API through its different releases. This is a blurb from the JMS 2.0 specification:
Quote: |
JMS 1.0 defined two domain-specific APIs, one for point-to-point messaging (queues) and one for pub/sub (topics). Although these remain part of JMS for reasons of backwards compatibility they should be considered to be completely superseded by the later APIs.
JMS 1.1 introduced a new unified API which offered a single set of interfaces that could be used for both point-to-point and pub/sub messaging. This is referred to here as the classic API.
JMS 2.0 introduces a simplified API which offers all the features of the classic API but which requires fewer interfaces and is simpler to use. |
MQQueueConnectionFactory would be from the JMS 1.0 specification.
MQConnectionFactory would be from the JMS 1.1 specification.
Since the JMS specification says 1.0 is superseded by 1.1, MQConnectionFactory would be preferred.
For some reason that I am not aware of, IBM MQ chose not to provide an MQ class for the JMS 2.0 API equivalent here which would be a JMSContext. In other words, there is no MQJMSContext. So I use MQConnectionFactory when needing to get into the JMS MQ extension code, even when coding at JMS 2.0. |
There is an implementation of the JMSContext . You first create a JmsFactoryFatctory that you use to create the JmsConnectionFactory or JmsXAConnecionFactory which you then use to create the JMSContext... The implementing class seems to be com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl
Note you can also use the JmsConnectionFactory to create JMS 1.1 or JMS 1.0 artifacts as it also implements the MQConnectionFactory
As for support for the MQ Extensions look at https://www.ibm.com/support/knowledgecenter/SSFKSJ_9.2.0/com.ibm.mq.dev.doc/q119130_.html
 |
That link looks like ways to turn off JMS 2.0 functionality if you are using the JMS 2.0 jar. What I would find confusing as an MQ JMS programmer is that IBM MQ provided MQ extensions classes for the JMS 1.0 classes like QueueConnectionFactory and JMS 1.1 class ConnectionFactory, but nothing for the JMS 2.0 class JMSContext. I also did not seen any MQ extension classes for the JMSProducer and JMSConsumer at JMS 2.0. So it seems you have to code at the JMS 1.1 API level if you want to use the MQ extension part of JMS. _________________ Working with MQ since 2010. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jan 08, 2021 7:35 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
|
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
|
|
|
|