Package org.mule.api.exception

Examples of org.mule.api.exception.SystemExceptionHandler


        final ValueHolder<Exception> exceptionHolder = new ValueHolder<Exception>();
        if (expectedFailingConnector != null)
        {
            // Register an exception-listener on the connector that expects to fail
            // and count down the latch after saving the thrown exception
            muleContext.setExceptionListener(new SystemExceptionHandler()
            {
                public void handleException(Exception e, RollbackMethod rollbackMethod)
                {
                    if (logger.isInfoEnabled()) logger.info("expected exception occurred: " + e, e);
                    exceptionHolder.value = e;
View Full Code Here


                                                    String expectedFailingConnector,
                                                    String serviceName)
    {
        // Declare countdown latch and listener
        final CountDownLatch latch = new CountDownLatch(1);
        SystemExceptionHandler listener = null;
        MessagingExceptionHandler messagingListener = null;
        MuleClient muleClient = p.getMuleClient();
        boolean localMuleClient = muleClient == null;
        SystemExceptionHandler currentExceptionListener = null;
        MessagingExceptionHandler currentMessagingListener = null;
        final ValueHolder<Exception> exceptionHolder = new ValueHolder<Exception>();

        try
        {
            // First create a local muleClient instance if not supplied
            if (localMuleClient) muleClient = new MuleClient(muleContext);

            // Next create a listener that listens for exception on the
            // sftp-connector
            listener = new SystemExceptionHandler()
            {
                public void handleException(Exception e, RollbackMethod rollbackMethod)
                {
                    exceptionHolder.value = e;
                    if (logger.isDebugEnabled())
View Full Code Here

    public void testConnectorExceptionHandling() throws Exception
    {
        Connector connector = getConnectorAndAssert();

        // Text exception handler
        SystemExceptionHandler ehandlerMock = mock(SystemExceptionHandler.class);

        assertNotNull(muleContext.getExceptionListener());
        muleContext.setExceptionListener(ehandlerMock);
        muleContext.getExceptionListener().handleException(new DefaultMuleException(MessageFactory.createStaticMessage("Dummy")));
View Full Code Here

        final ValueHolder<Exception> exceptionHolder = new ValueHolder<Exception>();
        if (expectedFailingConnector != null)
        {
            // Register an exception-listener on the connector that expects to fail
            // and count down the latch after saving the thrown exception
            muleContext.setExceptionListener(new SystemExceptionHandler()
            {
                @Override
                public void handleException(Exception e, RollbackSourceCallback rollbackMethod)
                {
                    if (logger.isInfoEnabled()) logger.info("expected exception occurred: " + e, e);
View Full Code Here

                                                    String expectedFailingConnector,
                                                    String serviceName)
    {
        // Declare countdown latch and listener
        final CountDownLatch latch = new CountDownLatch(1);
        SystemExceptionHandler listener = null;
        MessagingExceptionHandler messagingListener = null;
        SystemExceptionHandler currentExceptionListener = null;
        MessagingExceptionHandler currentMessagingListener = null;
        final ValueHolder<Exception> exceptionHolder = new ValueHolder<Exception>();

        try
        {
            // Next create a listener that listens for exception on the
            // sftp-connector
            listener = new SystemExceptionHandler()
            {
                @Override
                public void handleException(Exception e, RollbackSourceCallback rollbackMethod)
                {
                    exceptionHolder.value = e;
View Full Code Here

TOP

Related Classes of org.mule.api.exception.SystemExceptionHandler

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.