camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Is there an annotation for a camel proxy?
Date Mon, 15 Mar 2010 19:56:02 GMT
On Mon, Mar 15, 2010 at 8:51 PM, Christian Schneider
<chris@die-schneider.net> wrote:
> I just found the answer myself:
> @EndpointInject(uri = "direct:start")
> CustomerService customerService;
>
> The above already does the trick. Well this proves again that sometimes
> asking a question is the best way to find the answer ;-)
>

The @Produce and @Consume annotations are maybe better named.

Just search the Camel wiki for @Produce and read the links
http://camel.apache.org/pojo-producing.html

Maybe we should have added a hint about that at the Camel Proxy user guide.



> Greetings
>
> Christian
>
>
> Am 15.03.2010 20:38, schrieb Christian Schneider:
>>
>> I currently use the following in a test for the soap component:
>>
>> I define an attribute:
>> @EndpointInject(uri = "direct:start")
>>    protected Endpoint startEndpoint;
>>
>> then in the test I use:
>> CustomerService proxy = ProxyHelper.createProxy(startEndpoint,
>> classLoader, CustomerService.class);
>>
>> Is there an annotation to define a proxy attribute directly like the
>> following?
>> @Proxy(uri="direct:start")
>> CustomerService customerService;
>>
>> I think such an annotation could be quite handy.
>>
>> Greetings
>>
>> Christian
>>
>
>
> --
>
> Christian Schneider
> ---
> http://www.liquid-reality.de
>
>



-- 
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

Mime
View raw message