In MQ, if you have an instance of an existing queue manager, say queuemanager1 that your app has access to. You can send your message by creating a queue that points to a queue of another queue manager, queuemanager2, through queuemanager1. This is done because the app maybe doesn't have direct access to the queuemanager2 but the MQ Server hosting queumanager1 does.
The code looks something like this:
MQQueue destQueue = queuemanager1.accessQueue("queFromAnotherMngr",CMQC.MQOO_OUTPUT | CMQC.MQOO_FAIL_IF_QUIESCING,"queuemanager2", null, null);
I'm refactoring the code to use the IBM MQ JCA adapter for JBoss AS 6. So I believe I have to stick to the vanilla JMS api(Using InitialContext JNDI lookup, Producer,etc.) to have my connections managed by JBoss.
However, I can't figure out how to, in regular JMS, to allow the receiving MQ server to forward my message along to another queue of another queumanager (queuemanager2).
From what I've researched so far, there is object sent to MQ called Message queuing message descriptor (MQMD) and it has a field called "ReplyToQMgr" and "ReplyToQ". I think if I find a way to update those fields using JMS API with the JCA adpater, I have my solution. Any thoughts? Ideas? Suggestions? Solutions? Thanks!