Hi. Thanks for the answer. The thing is that the component context is not being injected to the POJO. If I do "getContext().getEndpoint(...,...) I get a NullPointerException because the context is null. How is it supposed to be injected? The "context="#context"" which is used in servicemix-cxfse doesn't work in servicemix-bean. Does the componentContext have to be injected explicitly? If so, how can it be done?
Sebastian Gomez. On Tue, Jun 24, 2008 at 4:44 PM, Guillaume Nodet <[EMAIL PROTECTED]> wrote: > You need to use the ComponentContext injected in your pojo to retrieve > a reference to the endpoint. > This can be done on the ComponentContext using different methods, one > of those being getEndpoint (see > http://java.sun.com/integration/1.0/docs/sdk/api/javax/jbi/component/ComponentContext.html > for more). This returns a ServiceEnpoint that you can set on the > exchange using setEndpoint instead of using the setService. > > On Tue, Jun 24, 2008 at 4:03 PM, Sebastian Gomez <[EMAIL PROTECTED]> wrote: >> I've seen that maybe using the #context it could work, but it's still >> not working for servicemix-bean isn't it? I'd have to go into >> servicemix-cxfse wouldn't I? There must be some way to do it in >> servicemix-bean! >> >> All ideas are welcome. >> >> Sebastian Gomez. >> >> On Tue, Jun 24, 2008 at 10:01 AM, Sebastian Gomez <[EMAIL PROTECTED]> wrote: >>> Hi. >>> >>> I'd like to send an exchange to a specific endpoint from a >>> servicemix-bean POJO. I've only seen exchanges sent to services, but >>> (correct me if I'm wrong) it is possible to have more than one >>> endpoint for each service. How can I specify which particular endpoint >>> I want to consume my message? >>> >>> Thanks in advance. >>> >>> Sebastian Gomez. >>> >> > > > > -- > Cheers, > Guillaume Nodet > ------------------------ > Blog: http://gnodet.blogspot.com/ >
