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 » MQQueueConnectionFactory vs MQConnectionFactory

Post new topic  Reply to topic
 MQQueueConnectionFactory vs MQConnectionFactory « View previous topic :: View next topic » 
Author Message
bobbee
PostPosted: Thu Jan 07, 2021 7:01 am    Post subject: MQQueueConnectionFactory vs MQConnectionFactory Reply with quote

Knight

Joined: 20 Sep 2001
Posts: 541
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
View user's profile Send private message Send e-mail AIM Address
tczielke
PostPosted: Thu Jan 07, 2021 10:07 am    Post subject: Reply with quote

Guardian

Joined: 08 Jul 2010
Posts: 939
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
View user's profile Send private message
fjb_saper
PostPosted: Fri Jan 08, 2021 5:51 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
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
View user's profile Send private message Send e-mail
tczielke
PostPosted: Fri Jan 08, 2021 6:35 am    Post subject: Reply with quote

Guardian

Joined: 08 Jul 2010
Posts: 939
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
View user's profile Send private message
fjb_saper
PostPosted: Fri Jan 08, 2021 7:35 am    Post subject: Reply with quote

Grand High Poobah

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

If you are looking for cloned and shared subscriptions this is the link for JMS2.0
https://www.ibm.com/support/knowledgecenter/SSFKSJ_9.2.0/com.ibm.mq.dev.doc/q119140_.html
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » MQQueueConnectionFactory vs MQConnectionFactory
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.