JBoss Community

Using JMS managed connections for outbound connectivity?

created by henk de boer in JCA - View the full discussion

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:

 

 

<tx-connection-factory>
    <jndi-name>RemoteJmsXA</jndi-name>
    <xa-transaction/>
    <rar-name>jms-ra.rar</rar-name>
    <connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>
    <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/RemoteJMSProvider</config-property>
    <max-pool-size>20</max-pool-size>       
    <depends>jboss.messaging:service=ServerPeer</depends>      
</tx-connection-factory>

 

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.

Reply to this message by going to Community

Start a new discussion in JCA at Community