Here is an example from Camel project

https://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/produce/ProduceTemplateTest.java

https://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/produce/ProduceTemplateTest-context.xml


On Tue, Jul 5, 2011 at 1:59 PM, Kovacs Zsolt <zsolt.m.kov...@gmail.com> wrote:
> Hi,
>  is there some complete example? because my *producer *variable null (I
> reproduced exactly what You wrote here,
>  with camelContext defined in beans.xml
> Thanks,
> Zsolt
>
>
> On Tue, Jul 5, 2011 at 12:15 PM, Charles Moulliard 
> <cmoulli...@gmail.com>wrote:
>
>> Hi,
>>
>> It depends if you camel Spring DSL or Java DSL
>>
>> With Spring DSL you can use the following syntax :
>>
>> <camelContext xmlns="http://camel.apache.org/schema/spring";>
>>    <!-- define a producer template -->
>>    <template id="producer"/>
>>
>> and @Autowired in your PoJo
>>
>>    @Autowired
>>    private ProducerTemplate producer;
>>
>> Regards,
>>
>> Charles Moulliard
>>
>> Apache Committer
>>
>> Blog : http://cmoulliard.blogspot.com
>> Twitter : http://twitter.com/cmoulliard
>> Linkedin : http://www.linkedin.com/in/charlesmoulliard
>> Skype: cmoulliard
>>
>>
>>
>> On Tue, Jul 5, 2011 at 12:05 PM, Kovacs Zsolt <zsolt.m.kov...@gmail.com>
>> wrote:
>> > Hi,
>> >  I tried to send some message to Camel endpoint from a bundle containing
>> > only a POJO as described in
>> >  http://camel.apache.org/pojo-producing.html but the producer template
>> is
>> > null,  how I can initialize?
>> > Regards,
>> > Zsolt
>> >
>>
>

Reply via email to