JMS Support 2.0 works fine with AMQ Classic 6.x, but if I use activemq-pool
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-pool</artifactId>
<version>6.1.3</version>
</dependency>
I get
java.lang.UnsupportedOperationException: createContext() is not supported
at org.apache.activemq.jms.pool.PooledConnectionFactory.createContext(PooledConnectionFactory.java:280)
So, JMS 2.0 support seems not to be provided here (although the correct transient amq-client dependency is included).
Any reasons for that?
What you're seeing is expected. I recommend you use this pool which is based on the ActiveMQ Classic code-base, but has full support for JMS 2.
That said, it's worth noting that no version of the JMS client implementation shipped with ActiveMQ Classic fully supports JMS 2, even in the latest 6.x release. It still lacks support for the following JMS 2 features & methods:
JMSProducer.setAsync(CompletionListener)
JMSProducer.getAsync()
MessageProducer.send(Destination, Message, CompletionListener)
MessageProducer.send(Destination, Message, int, int, long, CompletionListener)
MessageProducer.send(Message, CompletionListener)
MessageProducer.send(Message, int, int, long, CompletionListener)
Session.createSharedConsumer(Topic, String)
Session.createSharedConsumer(Topic, String, String)
Session.createSharedDurableConsumer(Topic, String)
Session.createSharedDurableConsumer(Topic, String, String)
JMSContext.createSharedConsumer(Topic, String)
JMSContext.createSharedConsumer(Topic, String, String)
JMSContext.createSharedDurableConsumer(Topic, String)
JMSContext.createSharedDurableConsumer(Topic, String, String)
If you want a full JMS 2 implementation I recommend ActiveMQ Artemis.