latch = new Latch();
systemExceptionCounter.set(0);
serviceExceptionCounter.set(0);
TestExceptionStrategy systemExceptionListener = new TestExceptionStrategy();
systemExceptionListener.setExceptionCallback(new ExceptionCallback()
{
public void onException(Throwable t)
{
systemExceptionCounter.incrementAndGet();
latch.countDown();
}
});
muleContext.setExceptionListener(systemExceptionListener);
TestExceptionStrategy serviceExceptionListener =
(TestExceptionStrategy) muleContext.getRegistry().lookupModel("TestModel").getExceptionListener();
serviceExceptionListener.setExceptionCallback(new ExceptionCallback()
{
public void onException(Throwable t)
{
serviceExceptionCounter.incrementAndGet();
latch.countDown();