Package flex.messaging.config

Examples of flex.messaging.config.ConfigurationException


            InitialContext ic = new InitialContext();
            workManager = (WorkManager)ic.lookup(workManagerJNDIName);
        }
        catch(NamingException ne)
        {
            ConfigurationException ce = new ConfigurationException();
            ce.setMessage(13600, new Object[] {workManagerJNDIName});
            ce.setRootCause(ne);
            throw ce;
        }
       
        workListener = new WorkListener() {
            public void workAccepted(WorkEvent event)
View Full Code Here


    protected void validate()
    {
        if (connectionFactoryName == null)
        {
            // JMS connection factory of message destinations with JMS Adapters must be specified.
            ConfigurationException ce = new ConfigurationException();
            ce.setMessage(JMSConfigConstants.MISSING_CONNECTION_FACTORY);
            throw ce;
        }

        if (destinationJndiName == 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;
        }
    }
View Full Code Here

        super.validate();

        if (settings.getConnectionFactory() == null)
        {
            // JMS connection factory of message destinations with JMS Adapters must be specified.
            ConfigurationException ce = new ConfigurationException();
            ce.setMessage(MISSING_CONNECTION_FACTORY);
            throw ce;
        }

        if (settings.getDestinationJNDIName() == 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;
        }

        if (settings.getMessageType() == null)
        {
            // Unsupported JMS Message Type ''{0}''. Valid values are javax.jms.TextMessage and javax.jms.ObjectMessage.
            ConfigurationException ce = new ConfigurationException();
            ce.setMessage(INVALID_JMS_MESSAGE_TYPE, new Object[] {null});
            throw ce;
        }
    }
View Full Code Here

        String oldId = getId();
       
        if (id == null)
        {
            // Id of a component cannot be null.
            ConfigurationException ce = new ConfigurationException();
            ce.setMessage(NULL_COMPONENT_PROPERTY, new Object[]{"id"});
            throw ce;
        }     
       
        this.id = id;
       
View Full Code Here

        super.validate();

        if (durableConsumers && durableSubscriptionName == null)
        {
            // JMS topic consumer for JMS destination ''{0}'' is configured to use durable subscriptions but it does not have a durable subscription name.
            ConfigurationException ce = new ConfigurationException();
            ce.setMessage(JMSConfigConstants.MISSING_DURABLE_SUBSCRIPTION_NAME, new Object[]{destinationJndiName});
            throw ce;
        }
    }
View Full Code Here

        if (messageType == null || (!(messageType.equals(JMSConfigConstants.TEXT_MESSAGE)
                || messageType.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[] {messageType});
            throw ce;
        }
    }
View Full Code Here

                }
            }
        }
        catch (ConfigurationException exception)
        {
            ConfigurationException ce = new ConfigurationException();
            ce.setMessage(UNSUPPORTED_POLICY, new Object[] {getId(), policyString});
            throw ce;
        }
        return policy;
    }
View Full Code Here

        if (!(mode.equals(JMSConfigConstants.AUTO_ACKNOWLEDGE)
                || mode.equals(JMSConfigConstants.DUPS_OK_ACKNOWLEDGE)
                || mode.equals(JMSConfigConstants.CLIENT_ACKNOWLEDGE)) )
        {
            // Invalid Acknowledge Mode ''{0}''. Valid values are AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, and CLIENT_ACKNOWLEDGE.
            ConfigurationException ce = new ConfigurationException();
            ce.setMessage(JMSConfigConstants.INVALID_ACKNOWLEDGE_MODE, new Object[] {mode});
            throw ce;
        }
        acknowledgeMode = mode;
    }
View Full Code Here

    public void setConnectionFactory(String factory)
    {
        if (factory == null)
        {
            // JMS connection factory of message destinations with JMS Adapters must be specified.
            ConfigurationException ce = new ConfigurationException();
            ce.setMessage(JMSConfigConstants.MISSING_CONNECTION_FACTORY);
            throw ce;
        }
        connectionFactory = factory;
    }
View Full Code Here

        if (!(mode.equals(JMSConfigConstants.DEFAULT_DELIVERY_MODE)
                || mode.equals(JMSConfigConstants.PERSISTENT)
                || mode.equals(JMSConfigConstants.NON_PERSISTENT)))
        {
            // Invalid Delivery Mode ''{0}''. Valid values are DEFAULT_DELIVERY_MODE, PERSISTENT, and NON_PERSISTENT.
            ConfigurationException ce = new ConfigurationException();
            ce.setMessage(JMSConfigConstants.INVALID_DELIVERY_MODE, new Object[] {mode});
            throw ce;
        }
        deliveryMode = mode;
    }
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.