This content has been marked as final.
Show 4 replies
-
1. Re: How to send message to a remote queue
wayland Nov 20, 2008 11:15 PM (in response to wayland)finally solved.
Forgot to add remote ip address to the connection factory.
e.g. @Resource(mappedName="jnp://remotehost:1099/ConnectionFactory") -
2. Re: How to send message to a remote queue
vandana_awat May 7, 2009 9:30 AM (in response to wayland)hi
could you please tell how's your jms-ds.xml configured to interact with the remote queues
i have tried the approach of
http://www.jboss.org/community/wiki/HowDoIConfigureTheJMSResourceAdapterToUseARemoteConnectionFactory;jsessionid=52AB6F6F37C5425035FA9B75AA8881CE
but can't get it to work
i'm not using EJB i want to use it in a web app...
your help would be greatly appreciated .. -
3. Re: How to send message to a remote queue
clebert.suconic May 7, 2009 3:57 PM (in response to wayland)That's pretty much the procedure.
- you define a JMSPRoviderLoader. Give it a name<mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="jboss.mq:service=JMSProviderLoader,name=JMSProvider"> <attribute name="ProviderName">MyProvider</attribute> <attribute name="ProviderAdapterClass"> org.jboss.jms.jndi.JNDIProviderAdapter </attribute> <!-- The queue connection factory --> <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute> <!-- The topic factory --> <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute> <!-- Uncomment to use HAJNDI to access JMS <attribute name="Properties"> java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces java.naming.provider.url=localhost:1100 </attribute> --> </mbean>
- you define the tx-connection-factory. make a reference to the provider loader using the property JmsProviderAdapterJNDI. Also define a JNDI name for the tx-connection-factory<connection-factories> <tx-connection-factory> <jndi-name>MyConnectionFactory</jndi-name> <xa-transaction/> <rar-name>jms-ra.rar</rar-name> <connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition> <adapter-display-name>JMS Adapter</adapter-display-name> <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property> <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/MyProvider</config-property> <security-domain-and-application>WhateverJmsXARealm</security-domain-and-application> </tx-connection-factory> </connection-factories>
- In your code, use refer to JNDI name from tx-connection-factory:javax.jms.ConnectionFactory factory = (javax.jms.ConnectionFactory)jndi.lookup("java:/MyConnectionFactory");
But all this is already defined on that Wiki. So I'm already providing you extra information. -
4. Re: How to send message to a remote queue
timfox May 8, 2009 3:42 AM (in response to wayland)Also this is a question on JCA configuration, not JBoss Messaging config.
None of the above config is JBM config.
Please ask in the JCA user forum.