Yes, it should work, though I haven't tested it. Make sure to only use
that when the exchange is sent by the consumer the first time. To
retrieve ServiceEndpoint, you can use the JBIContainer and access the
registry of endpoints.  Your listener can implement the
org.apache.servicemix.jbi.event.ContainerAware interface so that it is
injected a reference to the JBI container, then you should be able to
do the following:

   EndpointRegistry registry = container.getRegistry().getEndpointRegistry();

The endpoint registry contains lots of methods to query for endpoints.

On Wed, May 28, 2008 at 1:41 PM, pratibhaG <[EMAIL PROTECTED]> wrote:
>
> Suppose in my listener i have
> public void exchangeSent(ExchangeEvent event){
>        MessageExchange me = event.getExchange();
> }
> then can I use   me.setEndpoint(ServiceEndPoint arg) to change my route and
> send it to my destination?
> If I can use how to create ServiceEndPoint?
>
> -Pratibha
> --
> View this message in context: 
> http://www.nabble.com/How-to-route-message-from-a-listener--tp17483625p17510752.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Reply via email to