Reputation: 1018
If Websphere MQ is used as a XA(Distributed Transaction) Transaction Manager using Java MQ classes, not JTA, the Java application and the WMQ, both need to reside on the same host machine. I have been told this is because shared memory is used as Inter Process Communication mechanism. The Java application and the Websphere MQ both need access to shared memory to make XA work.
If we deploy WMQ in a docker container and keep our Java application in another docker container, both on the same host, will we be able to use the WMQ as a XA coordinator?
Will we have to use certain special configuration of the container to get it working? Can we allow the two containers to use common shared memory?
Regards,
Yash
Upvotes: 0
Views: 856
Reputation: 74720
You can use common IPC name spaces via the --ipc
option for run
and create
docker run -d --name=wmq wmq
docker run -d --ipc=container:wmq app
Or a less secure host ipc
docker run -d --ipc=host wmq
docker run -d --ipc=host app
I'm not sure of MQ's explicit support for either setup for XA but IBM do support MQ in Docker.
Upvotes: 1