You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by bruce76 <bh...@apress.com> on 2006/08/02 17:34:40 UTC

Questions about JDBCAuditor and JBIContainer

Hi,

We're planning on creating a display that shows all the messages flowing in
and out of the NMR (I realize that this is a continuation of the "Get all
messages off the NMR thread")

http://www.nabble.com/Capture-any-message-off-the-NMR--tf1902644.html

However, we want to explore the path of using either the JDBCAuditor or the
JBIContainer objects. So, here's my questions:

1. If I use the JBIContainter.addListener(listener), should I get a callback
on every MessageExchange flowing through the NMR?

2. If so, then is it possible to obtain the "sender" of the message? I
realize that I can determine the recipient of message from using either
MessageExchange.getEndpoint()  or  MessageExchange.getService()

Thanks,

Bruce
-- 
View this message in context: http://www.nabble.com/Questions-about-JDBCAuditor-and-JBIContainer-tf2040547.html#a5616242
Sent from the ServiceMix - User forum at Nabble.com.


Re: Questions about JDBCAuditor and JBIContainer

Posted by Guillaume Nodet <gn...@gmail.com>.
On 8/2/06, bruce76 <bh...@apress.com> wrote:
>
>
> Hi,
>
> We're planning on creating a display that shows all the messages flowing
> in
> and out of the NMR (I realize that this is a continuation of the "Get all
> messages off the NMR thread")
>
> http://www.nabble.com/Capture-any-message-off-the-NMR--tf1902644.html
>
> However, we want to explore the path of using either the JDBCAuditor or
> the
> JBIContainer objects. So, here's my questions:
>
> 1. If I use the JBIContainter.addListener(listener), should I get a
> callback
> on every MessageExchange flowing through the NMR?


Yes.  Every time  a JBI exchange is sent by a component using
 DeliveryChannel.send or DeliveryChannel.sendSync, the listener
is called with the given exchange.

2. If so, then is it possible to obtain the "sender" of the message? I
> realize that I can determine the recipient of message from using either
> MessageExchange.getEndpoint()  or  MessageExchange.getService()


Sure.
You should find the code in one of the existing listeners at
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/view/
Somehting like
   ((MessageExchangeImpl) exchange).getSourceId()
will return an identifier of the component that sent the exchange.

Thanks,
>
> Bruce
> --
> View this message in context:
> http://www.nabble.com/Questions-about-JDBCAuditor-and-JBIContainer-tf2040547.html#a5616242
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet