activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Purcell <>
Subject Re: [heads up] example of configuring the JMS bridge using the XBean XML
Date Wed, 19 Jul 2006 16:11:52 GMT


That is not entirely correct. If you are working with a foreign provider
which, like activemq, has a ConnectionFactory object that exposes a setter
for the connection properties like host and port (setBrokerUrl) this will
work. If, however, you are attempting to bridge to a foreign provider which
does not, weblogic for instance, it will not.  However, you can still

The activemq class that does the work is JmsQueueConnector. The method that
does the work, initializeForeignQueue, first checks to see if there is an
existing QueueConnection. If not it looks to see if
outboundQueueConnectionFactory is set. (In the weblogic case it does no good
to set this because, as stated, the weblogic JMS does not have an
appropriate setter.) If that is not set it checks for
outboundQueueConnectionFactoryName if that is set it does a lookup using the
jndiOutboundTemplate and the connection is made.

So what you need is to set outboundQueueConnectionFactoryName and
jndiOutboundTemplate in your activemq.xml config file. See the sample below:


<!-- START SNIPPET: example -->

  <!-- Allows us to use system properties as variables in this configuration
file -->
  <broker useJmx="true" xmlns="">
        <journaledJDBC journalLogFiles="5"
       <transportConnector name="default" uri="tcp://localhost:61616"
       <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
      <networkConnector name="default" uri="multicast://default"/>
     <jmsQueueConnector name="JreportRequestBridge-Inbound"
          <inboundQueueBridge inboundQueueName="jms/queue/jreport/request"/>


    <!-- Set up the template for connecting to Weblogic -->
    <bean id="remoteJndi" class="org.springframework.jndi.JndiTemplate">
	<property name="environment">
			<prop key="java.naming.provider.url">t3://</prop>

  <bean id="localFactory"
    <property name="brokerURL" value="tcp://localhost:61616" />
  <bean id="localQueue" class="org.apache.activemq.command.ActiveMQQueue">
    <constructor-arg value="dynamic/jms.queue.jreport.request"/>
<!-- END SNIPPET: xbean -->

View this message in context:
Sent from the ActiveMQ - User forum at

View raw message