ActiveMQ 5.11 with WebSphere Application Server 8.

2019-08-01 07:33发布

问题:

Does anybody know which jars from ActiveMQ 5.11 I need to use with IBM Websphere Application Server 8.5 in order to create a new ActiveMQ JMS Provider?

I found discussions related to older ActiveMQ versions that don't seem applicable anymore because the way ActiveMQ is packaged has changed:

  • https://www.ibm.com/developerworks/community/blogs/timdp/entry/using_activemq_as_a_jms_provider_in_websphere_application_server_7149?lang=en

ActiveMQ 5.11 doesn't seem to have activemq-core anymore, activeio-core is under "optional", and ActiveMQ seems to have switched from commons-logging to slf4j, which in itself seems to cause problems due to the fact that WAS itself ships an outdated version of the slf4j jars (see other questions here on SO).

Any advice is highly appreciated.

回答1:

Figured it out. It's really simple actually. In the WAS console, go to Resources -> JMS -> JMS Providers, and create a new provider as:

  • Classpath:

    • C:/activemq-libs/activemq-client-5.10.0.jar
    • C:/activemq-libs/hawtbuf-1.10.jar
    • C:/activemq-libs/slf4j-api-1.7.5.jar
  • External initial context factory:org.apache.activemq.jndi.ActiveMQInitialContextFactory
  • External provider URL: tcp://myhost:61616

Then go to Resources -> JMS -> Queue Connection Factories and create a new one as:

  • Name: myQCF
  • JNDI Name: jms/myQueueConnectionFactory
  • External JNDI Name: QueueConnectionFactory

You can create a new Queue as (Resources -> JMS -> Queues):

  • Name: myQueue
  • JNDI Name: queue/myQueue
  • External JNDI Name: dynamicQueues/myQueue

Maarten