Package flex.messaging.config

Examples of flex.messaging.config.ConfigurationException


    public void setDestinationJNDIName(String name)
    {
        if (name == null)
        {
            // JNDI names for message destinations with JMS Adapters must be specified.
            ConfigurationException ce = new ConfigurationException();
            ce.setMessage(JMSConfigConstants.MISSING_DESTINATION_JNDI_NAME);
            throw ce;
        }
        destinationJNDIName = name;
    }
View Full Code Here


        type = type.toLowerCase();

        if (!(type.equals(JMSConfigConstants.TOPIC) || type.equals(JMSConfigConstants.QUEUE)))
        {
            // JMS Adapter destination type must be Topic or Queue.
            ConfigurationException ce = new ConfigurationException();
            ce.setMessage(JMSConfigConstants.INVALID_DESTINATION_TYPE);
            throw ce;
        }
        destinationType = type;
    }
View Full Code Here

    {
        if (type == null || (!(type.equals(JMSConfigConstants.TEXT_MESSAGE)
                || type.equals(JMSConfigConstants.OBJECT_MESSAGE))) )
        {
            // Unsupported JMS Message Type ''{0}''. Valid values are javax.jms.TextMessage and javax.jms.ObjectMessage.
            ConfigurationException ce = new ConfigurationException();
            ce.setMessage(JMSConfigConstants.INVALID_JMS_MESSAGE_TYPE, new Object[] {type});
            throw ce;
        }
        messageType = type;
    }
View Full Code Here

            mode = mode.toLowerCase();

            if (!(mode.equals(JMSConfigConstants.ASYNC) || mode.equals(JMSConfigConstants.SYNC)))
            {
                // Invalid delivery-settings mode ''{0}''. Valid values are async and sync.
                ConfigurationException ce = new ConfigurationException();
                ce.setMessage(JMSConfigConstants.INVALID_DELIVERY_MODE_VALUE, new Object[] {mode});
                throw ce;
            }
            this.mode = mode;
        }
View Full Code Here

                    }
                }
            }
            catch (Throwable t)
            {
                ConfigurationException ex = new ConfigurationException();
                ex.setMessage(SINGLETON_ERROR, new Object[] { instance.getSource(), id });
                ex.setRootCause(t);

                if (Log.isError())
                    Log.getLogger(ConfigurationManager.LOG_CATEGORY).error(ex.getMessage() + StringUtils.NEWLINE + ExceptionUtil.toString(t));

                throw ex;
            }
        }
        else if(instance.getScope().equalsIgnoreCase(SCOPE_SESSION))
View Full Code Here

            channelEndpoint = StringUtils.substitute(channelEndpoint, "{context-root}", ConfigurationConstants.CONTEXT_PATH_TOKEN);

            if ((contextPath == null) && (channelEndpoint.indexOf(ConfigurationConstants.CONTEXT_PATH_TOKEN) != -1))
            {
                // context root must be specified before it is used
                ConfigurationException e = new ConfigurationException();
                e.setMessage(ConfigurationConstants.UNDEFINED_CONTEXT_ROOT, new Object[]{getId()});
                throw e;
            }

            // simplify the number of combinations to test by ensuring our
            // context path always starts with a slash
View Full Code Here

    public void setDefaultAdapter(String id)
    {
        if (adapterClasses.get(id) == null)
        {
            // No adapter with id '{0}' is registered with the service '{1}'.
            ConfigurationException ex = new ConfigurationException();
            ex.setMessage(ConfigurationConstants.UNREGISTERED_ADAPTER, new Object[]{id, getId()});
            throw ex;
        }
        defaultAdapterId = id;
    }
View Full Code Here

    public void addDestination(Destination destination)
    {
        if (destination == null)
        {
            // Cannot add null ''{0}'' to the ''{1}''
            ConfigurationException ex = new ConfigurationException();
            ex.setMessage(ConfigurationConstants.NULL_COMPONENT, new Object[]{"Destination", "Service"});
            throw ex;
        }

        String id = destination.getId();

        if (id == null)
        {
            // Cannot add ''{0}'' with null id to the ''{1}''
            ConfigurationException ex = new ConfigurationException();
            ex.setMessage(ConfigurationConstants.NULL_COMPONENT_ID, new Object[]{"Destination", "Service"});
            throw ex;
        }
        // No need to add if the destination is already there
        if (getDestination(id) == destination)
        {
View Full Code Here

    protected void validateEndpointProtocol()
    {
        if (isSecure() && !url.startsWith("https:"))
        {
            ConfigurationException ce = new ConfigurationException();
            ce.setMessage(11100, new Object[] {url, "https"});
            throw ce;
        }
    }
View Full Code Here

                && !FlexFactory.SCOPE_APPLICATION.equals(scope)
                && !FlexFactory.SCOPE_REQUEST.equals(scope))
        {
            // Invalid scope setting for RemotingService destination '{id}'.
            // Valid options are 'request', 'session', or 'application'.
            ConfigurationException ex = new ConfigurationException();
            ex.setMessage(INVALID_SCOPE, new Object[] {id, "\'request\', \'session\', or \'application\'"});
            throw ex;
        }

    }
View Full Code Here

TOP

Related Classes of flex.messaging.config.ConfigurationException

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.