James Strachan ha scritto:
2008/7/22 DominicTulley <[EMAIL PROTECTED]>:
When the broker is running on port 61616 things work fine but if I change the
broker to use 61613 (for instance) then camel isn't able to connect.  I
suppose there is some property I can set inside camelcontext to tell it the
port to use, but I haven't been able to discover what that is...

My XML in activemq.xml is:

 <camelContext id="camel"
xmlns="http://activemq.apache.org/camel/schema/spring";>
    <routeBuilderRef ref="MessageRouter" />
    <routeBuilderRef ref="AdminRouter" />
 </camelContext>

Any help appreciated!

Just define an instance of the camel ActiveMQComponent and configure
the brokerURL property. See the example here in the section
"Configuring the Connection Factory using Spring XML"...
http://activemq.apache.org/camel/activemq.html

just as a sidenote, if you are using a configuration with JAAS enabled
you'll end up needing to configure Camel with user and password
in order to access the broker. This is done in the same place as the
the transport configuration. For example:

 <bean id="activemq" 
class="org.apache.activemq.camel.component.ActiveMQComponent">
   <property name="brokerURL" value="tcp://localhost:61613"/>
   <property name="userName"  value="TestUser" />
   <property name="password"  value="TestPassword" />
 </bean>

Reply via email to