3 Replies Latest reply on Sep 1, 2009 6:55 AM by Andy Taylor

    Remote JMS Provider | Connecting EJB3 to a remote Topic ?

    Amit Aggarwal Newbie

      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"
       <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">

      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, then I am able to get it fine. That atleast tells me that the server 1 is getting the message.

      Thanks in advance,