Yeah you need to set the brokerURL on the activemq component. For example in the spring XML file.
The @Produce only refers to the activemq component and the name of the JMS destination to send the message to. On Fri, Jul 30, 2010 at 9:28 AM, benxs <[email protected]> wrote: > >> 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. > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
