Package org.mule.tck.testmodels.mule.TestExceptionStrategy

Examples of org.mule.tck.testmodels.mule.TestExceptionStrategy.ExceptionCallback


        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();
View Full Code Here


        assertNotNull("The payloadAsString shouln't have been null", payloadAsString);
        assertFalse("There shouldn't be a fault in the payload: " + payloadAsString,
            payloadAsString.contains("<soap:Fault>"));

        final Latch latch = new Latch();
        exceptionStrategy.setExceptionCallback(new ExceptionCallback()
        {
            public void onException(Throwable t)
            {
                connectorExceptionCounter.incrementAndGet();
                latch.countDown();
View Full Code Here

    {
        final CountDownLatch exceptionLatch = new CountDownLatch(1);

        send(scenarioCommit);

        final ExceptionCallback exceptionCallback = new ExceptionCallback()
        {
            public void onException(Throwable t)
            {
                assertTrue(ExceptionUtils.containsType(t,
                    org.mule.transaction.IllegalTransactionStateException.class));
View Full Code Here

    {
        final CountDownLatch exceptionLatch = new CountDownLatch(1);

        send(scenarioCommit);

        final ExceptionCallback exceptionCallback = new ExceptionCallback()
        {
            @Override
            public void onException(Throwable t)
            {
                assertTrue(ExceptionUtils.containsType(t,
View Full Code Here

        assertNotNull("The payloadAsString shouln't have been null", payloadAsString);
        assertFalse("There shouldn't be a fault in the payload: " + payloadAsString,
            payloadAsString.contains("<soap:Fault>"));

        final Latch latch = new Latch();
        exceptionStrategy.setExceptionCallback(new ExceptionCallback()
        {
            @Override
            public void onException(Throwable t)
            {
                connectorExceptionCounter.incrementAndGet();
View Full Code Here

        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();
View Full Code Here

TOP

Related Classes of org.mule.tck.testmodels.mule.TestExceptionStrategy.ExceptionCallback

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.