Package org.mule.api

Examples of org.mule.api.MuleRuntimeException


    protected MuleEventContext getEventContext()
    {
        if(RequestContext.getEventContext()==null)
        {
             throw new MuleRuntimeException(CoreMessages.objectIsNull("MuleEventContext"));
        }
        else
        {
            return RequestContext.getEventContext();
        }
View Full Code Here


        {
            return (Provider) ClassUtils.instanciateClass(info.getProviderClass());
        }
        catch (Exception ex)
        {
            throw new MuleRuntimeException(
                CoreMessages.failedToInitSecurityProvider(info.getProviderClass()), ex);
        }
    }
View Full Code Here

            }
        }
        catch (Exception e)
        {
            // Throw a runtime exception because the javax.mail API does not allow a checked exception on this method.
            throw new MuleRuntimeException(e);
        }
    }
View Full Code Here

            muleContext.getExceptionListener().handleException((Exception) e);
        }
        else
        {
            muleContext.getExceptionListener().handleException(
                new MuleRuntimeException(CoreMessages.connectorCausedError(this.getName()), e));
        }
    }
View Full Code Here

        {
            return serviceDescriptor.getDefaultExchangePattern();
        }
        catch (TransportServiceException tse)
        {
            throw new MuleRuntimeException(tse);
        }
    }
View Full Code Here

        {
            return serviceDescriptor.getInboundExchangePatterns();
        }
        catch (TransportServiceException tse)
        {
            throw new MuleRuntimeException(tse);
        }
    }
View Full Code Here

        {
            return serviceDescriptor.getOutboundExchangePatterns();
        }
        catch (TransportServiceException tse)
        {
            throw new MuleRuntimeException(tse);
        }
    }
View Full Code Here

                        }
                        muleContext.getRegistry().registerObject(bindTo.value(), o);
                    }
                    catch (RegistrationException e)
                    {
                        throw new MuleRuntimeException(CoreMessages.createStaticMessage("failed to bind " + bindTo.value()));
                    }
                }
                else if(bindRequired)
                {
                    throw new RuntimeException("Provider object type: " + type + ", must have a @Named annotation so that the object can be bound in Mule");
View Full Code Here

    @Override
    public void setObjectFactory(ObjectFactory objectFactory)
    {
        if (!(Callable.class.isAssignableFrom(objectFactory.getObjectClass())))
        {
            throw new MuleRuntimeException(CoreMessages.objectNotOfCorrectType(objectFactory.getObjectClass(),
                Callable.class));
        }
        super.setObjectFactory(objectFactory);
    }
View Full Code Here

        Transaction tx = TransactionCoordination.getInstance().getTransaction();
        boolean joinPossible = (action != ACTION_JOIN_IF_POSSIBLE || (action == ACTION_JOIN_IF_POSSIBLE && tx != null));
        if (action != ACTION_NEVER && action != ACTION_NONE && factory == null)
        {
            // TODO use TransactionException here? This causes API changes as TE is a checked exception ...
            throw new MuleRuntimeException(CoreMessages.transactionFactoryIsMandatory(getActionAsString()));
        }
        return action != ACTION_NEVER && action != ACTION_NONE && factory.isTransacted() && joinPossible;
    }
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.