hi all
  i have a camel app in which i have exposed few JMX beans.

I want to be able to send a message to a channel via my JMX bean.

I have read the POJO Producing info here

http://camel.apache.org/pojo-producing.html

and at the moment i am doing this in my JMX bean

@EndpointInject(uri="seda:testChannel")
    private ProducerTemplate producer;


However, i want to be able to send messages to different channels, not only
to the uri above.

Ok i can always create  a  'jmx-channel' with a router for each type of
message.,... but i was just wondering if i can just inject a
ProducerTemplate without specifying the URI/

I have tried using the  @Autowired but the bean wasn't being set correctly.
(the bean was not being set ,resulting in a NullPointerException whenever i
was invoking methods on it)

here's my camelContext where i define the producer

    <camel:camelContext xmlns="http://camel.apache.org/schema/spring";
        id="camelServer">

        <camel:template id="producer"/>

could anyone offer another suggestion (other than sending message to a
default channel associated with a router)?

w/kindest regards
 marco

Reply via email to