[jboss-user] [JBoss Messaging Users] - Remote JMS Provider | Connecting EJB3 to a remote Topic ?
artima
do-not-reply at jboss.com
Tue Aug 25 02:42:31 EDT 2009
Hi All,
I am using JBoss 5.1 + JBM2.0 BETA 4. I have a server, Server1 which has a topic and I need to receive messages on this topic on server 2. On Server 2, I am creating an RemoteJMSProvider, and using it in the EJB3 MDB, however, the connection b/w server 1 and server2 aint seems to be happening. I have gone through all the post on this site about this topic and I think I am doing exactly what the examples recommends. Can someone please help me with this problem.
Server 2 [jms-ds.xml]
<mbean code="org.jboss.jms.jndi.JMSProviderLoader"
| name="jboss.messaging:service=JMSProviderLoader,name=RemoteJMSProvider,server=remotehost">
| <attribute name="ProviderName">RemoteJMSProvider</attribute>
| <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
| <!-- The connection factory -->
| <attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
| <!-- The queue connection factory -->
| <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
| <!-- The topic factory -->
| <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
| <!-- Connect to JNDI on the host "the-remote-host-name" port 1099-->
| <attribute name="Properties">
| java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
| java.naming.factory.url.pkgs=org.jnp.interfaces
| java.naming.provider.url=10.10.111.11:13001
| </attribute>
| </mbean>
EJB on Server 2:
| @MessageDriven(mappedName = "jms/Topic11",activationConfig =
| {
| @ActivationConfigProperty(propertyName = "destination", propertyValue = "/topic/topictarget"),
| @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
| @ActivationConfigProperty(propertyName = "providerAdapterJNDI", propertyValue="java:/RemoteJMSProvider"),
| @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic")
| })
|
If however I create a POJO that directly consumes message from 10.10.111.11:13001, then I am able to get it fine. That atleast tells me that the server 1 is getting the message.
Thanks in advance,
amit.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4251370#4251370
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4251370
More information about the jboss-user
mailing list