I found 2 ways to connect to IBM MQ from Spring using JMS.

First: Using com.ibm.mq.jms.context.WMQInitialContextFactory

Second: com.ibm.mq.jms.MQQueueConnectionFactory

But I am not sure about the difference between these 2 approaches. When should I use which approach (OR) which one is the correct approach and advantage over other.

I would really appreciate if someone helps to sort out this doubt.

Many Thanks,