> You change the brokerURL 

How do I do this in java POJOs with annotations?

I think in pure java coding would be:

import org.apache.activemq.ActiveMQConnectionFactory;
...
  CamelContext context = new DefaultCamelContext();
  ConnectionFactory connectionFactory = new
ActiveMQConnectionFactory("tcp://localhost:51616");
  context.addComponent("test-jms",
JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));

But how do I do this with annotations?
Is there an annotation similar to:  @BrokerURL("tcp://localhost:51616");

Where do I have to put this statement into the following code?


import org.apache.camel.Consume;
import org.apache.camel.Produce;
import org.apache.camel.ProducerTemplate;

//START SNIPPET: ex
public class SendFileRecordsToQueueBean {
    @Produce(uri = "activemq:personnel.records")
    ProducerTemplate producer;

    @Consume(uri = "file:src/data?noop=true")
    public void onFileSendToQueue(String body) {
        producer.sendBody(body);
    }
}

Ben
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Put-XML-msgs-from-Java-POJO-into-already-running-ActiveMQ-instance-Camel-sample-adjustment-tp2256723p2259241.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to