quinta-feira, 19 de fevereiro de 2015

WebSphere AS, ActiveMQ and XA Transaction

Hi there,
after a frustrating long time research on Google results from the "active mq xa webphsere" search, I decided to write a post about it. I lost several hours to realize that it is just about the minor details, as I couldn't find a text explaining the whole thing, I tried a bunch of different sets and it is finally working.
Here is what you need to do:
On WAS (WebSphere Application Server):
  1. Go to "Resources -> JMS -> JMS Providers" (Menu on the left)
  2. Pick up a scope (Cell, Node, Server)
  3. Click on the "New" button
  4. Set  the attributes as follows:
    • Name: ActiveMQ
    • <<Class path / Native library Path>> - If your application is deployed with "activemq" libs you don't need to worry about these attributes.
    • External initial context factory: org.apache.activemq.jndi.ActiveMQWASInitialContextFactory
    • External provider URL: tcp://localhost:61616
  5. Click on the "Apply" button
  6. On "Additional Properties" tab (at the right) click on "Custom properties" link
  7. Add the following properties:
    (Remember: it is a 'key=value' pair property, the first 'text box' is the 'key', the second one is the 'value')
    • java.naming.connectionFactoryNames = QueueConnectionFactory
    • xa = true
  8. Go to "Resources -> JMS -> Connection factories" (Menu on the left)
  9. Pick up a scope (the same as you did on step 2)
  10. Click on the "New"button
  11. Set the attributes as follows:
    • Name: Queue Connection Factory
    • JNDI name: QueueConnectionFactory
    • External JNDI name: QueueConnectionFactory
    • Security settings -> Mapping-configuration alias: ClientCointainer
  12. That is it! Done!

Nenhum comentário:

Postar um comentário