0 Replies Latest reply on Jun 25, 2010 5:47 PM by henk de boer

    Using JMS managed connections for outbound connectivity?

    henk de boer Master

      If I define a JCA connection factory for JMS connections to a remote JMS provider ((JBoss Messaging), can these connections then be used for outbound connectivity? E.g. sending a message to a remote queue?


      I.e. suppose I would have a definition like the one below in a -ds.xml file, with an appropriate JmsProviderAdapter for the remote JBoss AS server:



          <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/RemoteJMSProvider</config-property>


      What can I then do myself with these connections? Is this connection factory only supposed to be used with stuff like bridges or invokers, or can I also request a connection in user code from this factory and use it to send a JMS message to a remote queue?


      I did a quick test with this, and found that no matter what I do, the messages I sent using such a managed connection always end up being handled by the local PostOffice, which has no knowledge of any remote queue or topic and thus refuses to do any routing. If I use a remote queue that happens to have the same name as a local queue, then the PostOffice seems to sent it to this local queue, even though I'm using a managed connection to the remote server and a destination that I obtained from the JNDI of the remote server.


      Any insight would be highly appreciated.