I have the following code:
while ((strLine = br.readLine()) != null) {
if(messageName.equals(strLine)){
System.out.println("MESSAGE equals line in file");
@EndpointInject(uri="bean:filterCCBean")
ProducerTemplate producer;
producer.sendBody(message);
break;
} else {
@EndpointInject(uri="bean:log4jBean")
ProducerTemplate producer;
producer.sendBody(message);
}
}
Basically I want if the line that I am reading from a file is matched with
messageName, I want the producer to send the "message" object to the
"filterCCBean". If I am in the else part, I want the object to be sent to
the "log4jBean".
I guess this is not the right way to do this since Eclipse is complaining
the EndpointInject is not allowed for that location.
Any help ?
--
View this message in context:
http://www.nabble.com/Sending-from-a-POJO-to-an-endpoint-tp20089728s22882p20089728.html
Sent from the Camel - Users mailing list archive at Nabble.com.