Package org.mule.api

Examples of org.mule.api.MessagingException


            }
            return args;
        }
        catch (TransformerException e)
        {
            throw new MessagingException(event, e, this);
        }
    }
View Full Code Here


                        {
                            // because dequeued event may still be owned by a previuos
                            // thread we need to use the copy created in AsyncMessageProcessorWorker
                            // constructor.
                            OptimizedRequestContext.unsafeSetEvent(work.getEvent());
                            throw new MessagingException(work.getEvent(), e, SedaStageInterceptingMessageProcessor.this);
                        }
                        return null;
                    }
                };
View Full Code Here

        ExecutionTemplate executionTemplate = createExceptionHandlingTransactionTemplate();
        TransactionCoordination.getInstance().bindTransaction(mockTransaction);
        configureExceptionListener(null, "org.mule.api.MessagingException");
        try
        {
            executionTemplate.execute(TransactionTemplateTestUtils.getFailureTransactionCallback(new MessagingException(mockEvent, null)));
            fail("MessagingException must be thrown");
        }
        catch (MessagingException e) {}
        verify(mockTransaction, VerificationModeFactory.times(0)).setRollbackOnly();
        verify(mockTransaction, VerificationModeFactory.times(0)).commit();
View Full Code Here

    public MuleEvent process(MuleEvent event) throws MuleException
    {
        if (event.isTransacted())
        {
            throw new MessagingException(CoreMessages.asyncDoesNotSupportTransactions(), event, this);
        }

        if (target != null)
        {
            // Clone event and make it async
View Full Code Here

                    }
                };

                if (e instanceof MessagingException)
                {
                    MessagingException messagingException = (MessagingException) e;
                    if (!messagingException.getEvent().isTransacted() && messagingException.causedRollback())
                    {
                        rollbackMethod.rollback();
                    }
                }
                else
View Full Code Here

            {
                long timeout = ((HttpsConnector) getConnector()).getSslHandshakeTimeout();
                boolean handshakeComplete = latch.await(timeout, TimeUnit.MILLISECONDS);
                if (!handshakeComplete)
                {
                    throw new MessagingException(HttpMessages.sslHandshakeDidNotComplete(), message);
                }
            }
            catch (InterruptedException e)
            {
                throw new MessagingException(HttpMessages.sslHandshakeDidNotComplete(),
                                             message, e);
            }

            super.preRouteMessage(message);
View Full Code Here

            if (logger.isDebugEnabled())
            {
                logger.debug("Exception while sending http response");
                logger.debug(e);
            }
            throw new MessagingException(responseMuleEvent,e);
        }
    }
View Full Code Here

    @Override
    public void sendFailureResponseToClient(MessagingException messagingException) throws MuleException
    {
        MuleEvent response = messagingException.getEvent();
        MessagingException e = getExceptionForCreatingFailureResponse(messagingException, response);
        String temp = ExceptionHelper.getErrorMapping(getInboundEndpoint().getConnector().getProtocol(), messagingException.getClass(), getMuleContext());
        int httpStatus = Integer.valueOf(temp);
        try
        {
            sendFailureResponseToClient(e, httpStatus);
View Full Code Here

        failureResponseSentToClient = true;
    }

    private MessagingException getExceptionForCreatingFailureResponse(MessagingException messagingException, MuleEvent response)
    {
        MessagingException e = messagingException;
        if (response != null &&
            response.getMessage().getExceptionPayload() != null &&
            response.getMessage().getExceptionPayload().getException() instanceof MessagingException)
        {
            e = (MessagingException) response.getMessage().getExceptionPayload().getException();
View Full Code Here

    protected boolean isProcessAsync(MuleEvent event) throws MessagingException
    {
        if (event.isSynchronous() || event.isTransacted())
        {
            throw new MessagingException(
                CoreMessages.createStaticMessage(SYNCHRONOUS_EVENT_ERROR_MESSAGE),
                event, this);
        }
        return doThreading && !event.isSynchronous();
    }
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.