1 Reply Latest reply on Feb 1, 2011 7:36 AM by Gary Tully

    Always connecting to default Broker.

    Ram Konchada Newbie

      Hi,

       

      I am trying to configure a a Active MQ connection factory in my bean.xml files to connect to a non-default broker, but the application is always trying to connect to default broker (tcp://localhost:61616). I modified the camel-osgi example and please find my beans.xml configuration below.

       

      Below is the log message from service mix that says it is connecting to local broker.

       

      -


      INFO  | ActiveMQ Task    | FailoverTransport                | sport.failover.FailoverTransport  876 | 46 - org.apache.activemq.activemq-core - 5.4.1.fuse-01-00 | Successfully connected to tcp://localhost:61616

      -


       

      My end goal is to be able to configure it for XA transactions using Atomiko's transaction manager. Please let me know if anybody is using XA in production environment as this is the key factor for us.

       

      I might be doing something wrong as I am relatively a beginner with these products.

       

      Your help will be appreciated.

       

      thanks,

      -Ram Konchada

       

      ==========================================

       

       

          <property name="prefix" value="$"/>

         

       

       

      ==========================================

       

      Edited by: ramanujam95 on Jan 31, 2011 10:14 AM

        • 1. Re: Always connecting to default Broker.
          Gary Tully Novice

          You need to override the brokerURL property in your ActiveMQConfiguration bean as the default is hard coded. You have the relevant property comment in a different location

          <!-- <property name="brokerURL" value="tcp://localhost:61617"/> -->

          so move it to the ActiveMQConfiguration and uncomment.

          Typically you would use set the properties of the ActiveMQComponent rather than use a separate ActiveMQConfiguration bean. But both should work.