Package org.mule.api

Examples of org.mule.api.MuleRuntimeException


        {
            MessagingExceptionHandler messagingExceptionHandler = muleContext.getRegistry().lookupObject(
                defaultExceptionStrategyName);
            if (messagingExceptionHandler == null)
            {
                throw new MuleRuntimeException(CoreMessages.createStaticMessage(String.format(
                    "No global exception strategy defined with name %s.", defaultExceptionStrategyName)));
            }
            if (messagingExceptionHandler instanceof MessagingExceptionHandlerAcceptor)
            {
                MessagingExceptionHandlerAcceptor messagingExceptionHandlerAcceptor = (MessagingExceptionHandlerAcceptor) messagingExceptionHandler;
                if (!messagingExceptionHandlerAcceptor.acceptsAll())
                {
                    throw new MuleRuntimeException(
                        CoreMessages.createStaticMessage("Default exception strategy must not have expression attribute. It must accept any message."));
                }
            }
        }
    }
View Full Code Here


        }
        catch (FatalBeanException fbex)
        {
            // FBE is a result of a broken config, propagate it (see MULE-3297 for more details)
            String message = String.format("Failed to lookup beans of type %s from the Spring registry", type);
            throw new MuleRuntimeException(MessageFactory.createStaticMessage(message), fbex);
        }
        catch (Exception e)
        {
            logger.debug(e);
            return Collections.emptyMap();
View Full Code Here

        }
        catch (FatalBeanException fbex)
        {
            // FBE is a result of a broken config, propagate it (see MULE-3297 for more details)
            String message = String.format("Failed to lookup beans of type %s from the Spring registry", type);
            throw new MuleRuntimeException(MessageFactory.createStaticMessage(message), fbex);
        }
        catch (Exception e)
        {
            logger.debug(e);
            return Collections.emptyMap();
View Full Code Here

        return (this.key == null && (getKeyType().isAssignableFrom(key.getClass()) && getResourceType().isAssignableFrom(resource.getClass()))) || (this.key != null && (this.key == key && this.resource == resource));
    }

    protected Class getResourceType()
    {
        throw new MuleRuntimeException(CoreMessages.createStaticMessage("Transaction type: " + this.getClass().getName() + " doesn't support supports(..) method"));
    }
View Full Code Here

        // this sets values used below, if they appear as properties
        setPropertiesFromProperties(props);

        if (uriBuilder == null)
        {
            throw new MuleRuntimeException(CoreMessages.objectIsNull("uriBuilder"));
        }
        uriBuilder.setMuleContext(muleContext);
    }
View Full Code Here

        throw new MuleRuntimeException(CoreMessages.createStaticMessage("Transaction type: " + this.getClass().getName() + " doesn't support supports(..) method"));
    }

    protected Class getKeyType()
    {
        throw new MuleRuntimeException(CoreMessages.createStaticMessage("Transaction type: " + this.getClass().getName() + " doesn't support supports(..) method"));
    }
View Full Code Here

        {
            lifecycleManager = new ServiceLifecycleManager(this, muleContext);
        }
        catch (MuleException e)
        {
            throw new MuleRuntimeException(CoreMessages.failedToCreate("Service Lifecycle Manager"), e);
        }

    }
View Full Code Here

                    logger.info("Found WebSphere 4: " + FACTORY_CLASS_4);
                }
                catch (ClassNotFoundException ex3)
                {
                    logger.debug("Could not find WebSphere 4 TransactionManager factory class", ex3);
                    throw new MuleRuntimeException(
                        CoreMessages.createStaticMessage("Couldn't find any WebSphere TransactionManager factory class, "
                                                         + "neither for WebSphere version 5.1 nor 5.0 nor 4"),
                        ex);
                }
            }
        }
        try
        {
            Method method = clazz.getMethod("getTransactionManager", (Class[])null);
            transactionManager = (TransactionManager) method.invoke(null, (Object[])null);
        }
        catch (Exception ex)
        {
            throw new MuleRuntimeException(
                CoreMessages.createStaticMessage("Found WebSphere TransactionManager factory class ["
                                                 + clazz.getName()
                                                 + "], but couldn't invoke its static 'getTransactionManager' method"),
                ex);
        }
View Full Code Here

        if (factory == null)
        {
            if (action != ACTION_INDIFFERENT)
            {
                // TODO use TransactionException here? This causes API changes as TE is a checked exception ...
                throw new MuleRuntimeException(CoreMessages.transactionFactoryIsMandatory(getActionAsString()));
            }

        }
        else if (!factory.isTransacted())
        {
View Full Code Here

        }
    }

    protected <T> T createOperationResource(ImmutableEndpoint endpoint) throws MuleException
    {
        throw new MuleRuntimeException(CoreMessages.createStaticMessage("Operation not supported by dispatcher"));
    }
View Full Code Here

TOP

Related Classes of org.mule.api.MuleRuntimeException

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.