On 10/8/07, Gert Vanthienen <[EMAIL PROTECTED]> wrote:
> Kumar,
>
>
> I'm afraid we do not have any good documentation on the servicemix-audit
> features.  There is an out-of-the-box JDBC auditor (have a look at the
> javadocs for more information on that).
>
> You can always create your own Auditor by creating a class that extends
> AbstractAuditor (available in servicemix-audit.jar) and registering it
> in conf/servicemix.xml under the services.  Use the exchangeSent() and
> exchangeAccepted() methods in the auditor to add code for logging
> whatever information you need.

Actually the exchangeSent() and exchangeAccepted() methods originate
in the ExchangeListener interface. Writing an implementation of
ExchangeListener is much easier than creating your own Auditor from
the AbstractAuditor. Below are some steps to take for implementing and
deploying your own ExchangeListener:

1) Implement the ExchangeListener interface
2) Package it as a JAR file and drop it in the ServiceMix lib/ dir
3) Use Spring bean syntax to register your ExchangeLIstener
implementation in the conf/servicemix.xml file outside of any
ServiceMix-specific elements (e.g., <bean id="foo"
class="com.mycompany.listener.MyCustomExchangeListener" />)

Your implementation of the exchangeSent() and/or exchangeAccepted()
methods should catch any message exchange that is sent to/from the
NMR. It's just up to you what you do with those exchanges.

Bruce
-- 
perl -e 'print unpack("u30","D0G)[EMAIL 
PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/
Castor - http://castor.org/

Reply via email to