Package org.mule.api

Examples of org.mule.api.MessagingException


        public boolean matches(Object argument)
        {
            ServerNotification notification = (ServerNotification) argument;
            if (exceptionExpected)
            {
                MessagingException exception = null;
                if (notification instanceof PipelineMessageNotification)
                {
                    exception = ((PipelineMessageNotification) notification).getException();
                }
                else if (notification instanceof AsyncMessageNotification)
View Full Code Here


                {
                    MimeType mt = new MimeType(contentType);
                    String messageMimeType = mt.getPrimaryType() + "/" + mt.getSubType();
                    if (!messageMimeType.equals(endpointMimeType))
                    {
                        throw new MessagingException(
                            CoreMessages.unexpectedMIMEType(messageMimeType, endpointMimeType), event, this);
                    }
                }
                catch (MimeTypeParseException ex)
                {
                    throw new MessagingException(CoreMessages.illegalMIMEType(contentType), event, ex, this);
                }
            }
        }

        return event;
View Full Code Here

        {
            ensurePayloadSerializable(event);
        }
        catch (final Exception e)
        {
            throw new MessagingException(
                    MessageFactory.createStaticMessage("Failed to prepare message for processing"), event, e, getUntilSuccessfulConfiguration().getRouter());
        }
        try
        {
            final Serializable eventStoreKey = storeEvent(event);
            scheduleForProcessing(eventStoreKey, true);
            if (getUntilSuccessfulConfiguration().getAckExpression() == null)
            {
                return VoidMuleEvent.getInstance();
            }
            return processResponseThroughAckResponseExpression(event);
        }
        catch (final Exception e)
        {
            throw new MessagingException(
                    MessageFactory.createStaticMessage("Failed to schedule the event for processing"), event, e,
                    getUntilSuccessfulConfiguration().getRouter());
        }
    }
View Full Code Here

        if (getUntilSuccessfulConfiguration().getDlqMP() == null)
        {
            logger.info("Retry attempts exhausted and no DLQ defined");
            RetryPolicyExhaustedException retryPolicyExhaustedException = new RetryPolicyExhaustedException(
                    CoreMessages.createStaticMessage("until-successful retries exhausted"), this);
            messagingExceptionHandler.handleException(new MessagingException(event, retryPolicyExhaustedException), event);
            return;
        }

        logger.info("Retry attempts exhausted, routing message to DLQ: " + getUntilSuccessfulConfiguration().getDlqMP());
        try
        {
            getUntilSuccessfulConfiguration().getDlqMP().process(mutableEvent);
        }
        catch (MessagingException e)
        {
            messagingExceptionHandler.handleException(e, event);
        }
        catch (Exception e)
        {
            messagingExceptionHandler.handleException(new MessagingException(event, e), event);
        }
    }
View Full Code Here

            if (hasResponse)
            {
                if (!event.getMuleContext().waitUntilStarted(event.getTimeout()))
                {
                    throw new MessagingException(MessageFactory.createStaticMessage("Timeout waiting for mule context to be completely started"), event);
                }

                MuleMessage resultMessage = doSend(event);
                if (resultMessage != null)
                {
View Full Code Here

            {
                throw e;
            }
            catch (MuleException e)
            {
                throw new MessagingException(e.getI18nMessage(), theEvent, e, this);
            }
        }
        //TODO
        throw new RuntimeException("Event not processed");
    }
View Full Code Here

                {
                    MimeType mt = new MimeType(contentType);
                    String messageMimeType = mt.getPrimaryType() + "/" + mt.getSubType();
                    if (!messageMimeType.equals(endpointMimeType))
                    {
                        throw new MessagingException(
                            CoreMessages.unexpectedMIMEType(messageMimeType, endpointMimeType), event, this);
                    }
                }
                catch (MimeTypeParseException ex)
                {
                    throw new MessagingException(CoreMessages.illegalMIMEType(contentType), event, ex, this);
                }
            }
        }

        return event;
View Full Code Here

            if (copyEvent)
            {
                if (((DefaultMuleMessage) message).isConsumable())
                {
                    throw new MessagingException(CoreMessages.cannotCopyStreamPayload(message.getPayload().getClass().getName()), event, this);
                }
                eventToRoute = OptimizedRequestContext.criticalSetEvent(event);
            }
            else
            {
View Full Code Here

    public static class ExceptionThrower implements MessageProcessor
    {
        @Override
        public MuleEvent process(MuleEvent event) throws MuleException
        {
            throw new MessagingException(event,null);
        }
View Full Code Here

        Message responseMsg;
        AxisEngine engine = getAxis();
        if (engine == null)
        {

            throw new MessagingException(CoreMessages.objectIsNull("Axis Engine"), context.getMessage());
        }
        MessageContext msgContext = new MessageContext(engine);

        String contentType;
        try
View Full Code Here

TOP

Related Classes of org.mule.api.MessagingException

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.