Examples of ExceptionPayload


Examples of org.mule.api.ExceptionPayload

        public MuleEvent process(MuleEvent event) throws MuleException
        {
            final MuleEvent nextResult = super.processNext(event);

            final ExceptionPayload nextResultMessageExceptionPayload = getExceptionPayload(nextResult);

            if (nextResultMessageExceptionPayload != null)
            {
                return errorExpressionTransformer.process(event);
            }
View Full Code Here

Examples of org.mule.api.ExceptionPayload

            try
            {
                final MuleEvent nextResult = super.processNext(event);

                final ExceptionPayload nextResultMessageExceptionPayload = getExceptionPayload(nextResult);

                if (nextResultMessageExceptionPayload != null)
                {
                    result.getMessage().setExceptionPayload(nextResultMessageExceptionPayload);
                }
View Full Code Here

Examples of org.mule.api.ExceptionPayload

            //Throwable t = ExceptionHelper.getRootException(ex);

            logException(ex);
            doHandleException(ex, event);

            ExceptionPayload exceptionPayload = new DefaultExceptionPayload(ex);
            if (RequestContext.getEvent() != null)
            {
                RequestContext.setExceptionPayload(exceptionPayload);
            }
            event.getMessage().setPayload(NullPayload.getInstance());
View Full Code Here

Examples of org.mule.api.ExceptionPayload

        {
            logger.debug("Committing transaction");
            commit();
        }

        ExceptionPayload exceptionPayload = new DefaultExceptionPayload(ex);
        if (RequestContext.getEvent() != null)
        {
            RequestContext.setExceptionPayload(exceptionPayload);
        }
       
View Full Code Here

Examples of org.mule.api.ExceptionPayload

     * @param message a non null message to filter.
     * @return <code>true</code> if the message matches the filter
     */
    public boolean accept(MuleMessage message)
    {
        ExceptionPayload epl = message.getExceptionPayload();

        if (getExpectedType() == null)
        {
            return epl != null;
        }
        else if (epl != null)
        {
            return getExpectedType().isAssignableFrom(epl.getException().getClass());
        }
        else
        {
            return false;
        }
View Full Code Here

Examples of org.mule.api.ExceptionPayload

        if (message == null)
        {
            return false;
        }

        final ExceptionPayload exceptionPayload = message.getExceptionPayload();
        if (exceptionPayload != null)
        {
            logger.info("Failure returned, will try next endpoint. Exception payload is: " + exceptionPayload);
            return true;
        }
View Full Code Here

Examples of org.mule.api.ExceptionPayload

            MuleEvent event = receiver.routeMessage(messageToRoute);
            MuleMessage message = event == null ? null : event.getMessage();

            if (message != null)
            {
                ExceptionPayload wsException = message.getExceptionPayload();

                if (wsException != null)
                {
                    MuleException exception = ExceptionHelper.getRootMuleException(wsException.getException());
                    // if the exception has a cause, then throw only the cause
                    if (exception.getCause() != null)
                    {
                        throw exception.getCause();
                    }
View Full Code Here

Examples of org.mule.api.ExceptionPayload

    {
        MuleClient client = new MuleClient(muleContext);
        RemoteDispatcher dispatcher = client.getRemoteDispatcher("tcp://localhost:25551");
        MuleMessage result = dispatcher.sendRemote("vm://test.queue.1", new Date(), null);
        assertNotNull(result);
        ExceptionPayload exceptionPayload = result.getExceptionPayload();
        assertNotNull(exceptionPayload);
        assertTrue(exceptionPayload.getException() instanceof TransformerMessagingException);
        assertTrue(exceptionPayload.getRootException() instanceof Exception);
    }
View Full Code Here

Examples of org.mule.api.ExceptionPayload

    {
        MuleClient client = new MuleClient(muleContext);
        RemoteDispatcher dispatcher = client.getRemoteDispatcher("tcp://localhost:25551");
        MuleMessage result = dispatcher.sendRemote("test.queue.2", new Date(), null);
        assertNotNull(result);
        ExceptionPayload exceptionPayload = result.getExceptionPayload();
        assertNotNull(exceptionPayload);
        assertTrue(exceptionPayload.getRootException() instanceof MalformedEndpointException);
    }
View Full Code Here

Examples of org.mule.api.ExceptionPayload

    {
        MuleClient client = new MuleClient(muleContext);
        RemoteDispatcher dispatcher = client.getRemoteDispatcher("tcp://localhost:25551");
        MuleMessage result = dispatcher.sendRemote("vm://test.queue.2", new Date(), null);
        assertNotNull(result);
        ExceptionPayload exceptionPayload = result.getExceptionPayload();
        assertNotNull(exceptionPayload);
        assertTrue(exceptionPayload.getRootException().getClass().getName(),
                   exceptionPayload.getRootException() instanceof FunctionalTestException);
        assertEquals("Functional Test Service Exception", exceptionPayload.getRootException().getMessage());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.