I've been trying to create a config file (activemq.xml) for the following
setup, but I just can't seem to get it to work. I can get messages on the
queue, but they're not getting bridged to JBoss MQ. I've read and re-read
the help on http://activemq.apache.org/jms-to-jms-bridge.html, I looked over
the test cases that come with the source distro, and I've searched and read
a lot of postings on the forum, but just can't seem to get it right. Can
someone please give me a hand?

Setup:

- ActiveMQ 5.1
- Standalone Java 1.6 app.
- Want to have an embedded ActiveMQ broker so that I can put things on its
queue using the vm://brokerName syntax. The messages should be persisted
locally - the default kaha method is fine, no rdbms needed. I was able to
config this broker okay and I have code that can successfully put messages
on its queue.
- Want all messages that are enqueued to the embedded broker's queue to be
forwarded to an instance of JBoss MQ (JBoss 4.0.3) running on a different
server. This is the part I was not able to get working.
- Want ActiveMQ to handle the loss of connectivity to JBoss MQ gracefully.
If JBoss goes down or the connection is temporarily lost (it's over a WAN
connection), ActiveMQ should handle that for my app so I can continue to use
the ActiveMQ queue with no impact and my messages will eventually make it to
the JBoss queue when it's again available.

Any help or assistance would be greatly appreciated!

Thanks,
Dave 

My current (not working) activemq.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd";>

<beans>
    <!-- 
    This is the main broker. Put messages here to get them relayed. The uri
to
    access this broker from within the JVM is vm://mainBroker.
    -->
    <bean id="mainBroker" class="org.apache.activemq.broker.BrokerService"
init-method="start" destroy-method="stop">
        <property name="brokerName" value="mainBroker"/>
        <property name="persistent" value="false"/>
        <property name="transportConnectorURIs">
            <list>
                <value>vm://localhost</value>
            </list>
        </property>

        <property name="jmsBridgeConnectors">
            <list>
              <ref bean="jmsQueueConnector"/>
           </list>
        </property>
    </bean>
    
    <!-- the jms queue connector "A Bridge to other JMS Queue providers" -->
   <bean id="jmsQueueConnector"
class="org.apache.activemq.network.jms.JmsQueueConnector">
      <property name="name" value="jmsQueueBridge"/>
      <property name="jndiOutboundTemplate" ref="remoteJndi"/>
      <property name="outboundQueueConnectionFactoryName"
value="UIL2ConnectionFactory"/>
      <property name="outboundQueueBridges">
         <list>
            <ref bean="outboundQueueJbossBridge" />
         </list>
      </property>  
  </bean>

    <!-- jndi template -->
  <bean id="remoteJndi" class="org.springframework.jndi.JndiTemplate">
    <property name="environment">
      <props>
        <prop key="java.naming.provider.url">jnp://10.3.0.181:1099</prop>
        <prop
key="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</prop>
      </props>
    </property>
  </bean>

    <!-- outbound queue -->
   <bean id="outboundQueueJbossBridge"
class="org.apache.activemq.network.jms.OutboundQueueBridge">
      <property name="outboundQueueName" value="queue/JobRequestQueue"/>
   </bean>

</beans>


-- 
View this message in context: 
http://www.nabble.com/jms-to-jms-bridge-%28to-JBoss-MQ%29-tp19112646p19112646.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to