Package org.jacorb.config

Examples of org.jacorb.config.ConfigurationException


        portMax = getPortProperty(config, MAX_PROP);

        // Check min < max
        if (portMin > portMax)
        {
            throw new ConfigurationException("PortRangeFactory: minimum port number not less than or equal to maximum");
        }
    }
View Full Code Here


        {
            port += 65536;
        }
        if ((port <= 0) || (port > 65535))
        {
            throw new ConfigurationException("PortRangeFactory: " + name + " invalid port number");
        }

        return port;
    }
View Full Code Here

        portMax = getPortProperty(config, MAX_PROP);

        // Check min < max
        if (portMin > portMax)
        {
            throw new ConfigurationException("PortRangeFactory: minimum port number not less than or equal to maximum");
        }
    }
View Full Code Here

        {
            port += 65536;
        }
        if ((port <= 0) || (port > 65535))
        {
            throw new ConfigurationException("PortRangeFactory: " + name + " invalid port number");
        }

        return port;
    }
View Full Code Here

        {
            sslServerSocketFactoryClazz = configuration.getAttribute(SSL_SERVER_SOCKET_FACTORY, "");

            ifsslServerSocketFactoryClazz.length() == 0 )
            {
                throw new ConfigurationException( "SSL support is on, but the property \"" + SSL_SERVER_SOCKET_FACTORY + "\" is not set!" );
            }

            sslSocketFactoryClazz = configuration.getAttribute(SSL_SOCKET_FACTORY, "");

            if (sslSocketFactoryClazz.length() == 0)
            {
                throw new ConfigurationException("SSL support is on, but the property \"" + SSL_SOCKET_FACTORY + "\" is not set");
            }
            sslListener = (SSLSessionListener) configuration.getAttributeAsObject(SSL_LISTENER, NullSSLSessionListener.class.getName());
        }
    }
View Full Code Here

    @Override
    public void configure(Configuration configuration) throws ConfigurationException
    {
       if( configuration == null )
       {
          throw new ConfigurationException("ProfileBase: given configuration was null");
       }

       this.configuration = configuration;
    }
View Full Code Here

    public void configure(Configuration configuration)
        throws ConfigurationException
    {
        if( configuration == null )
        {
            throw new ConfigurationException("ProtocolAddressBase: given configuration was null");
        }

        this.configuration = configuration;
    }
View Full Code Here

    throws ConfigurationException
    {

        if (configuration == null)
        {
            throw new ConfigurationException ("SelectorManager.configure was " +
                                              "passed a null Configuration object");
        }

        logger = configuration.getLogger("org.jacorb.util");
        loggerDebugEnabled = logger.isDebugEnabled();
View Full Code Here

            sasContext = (ISASContext)c.newInstance();
        }
        catch (IllegalArgumentException e)
        {
            logger.error ("Caught ", e);
            throw new ConfigurationException ("Could not load SAS context class " + contextClass);
        }
        catch (ClassNotFoundException e)
        {
            logger.error ("Caught ", e);
            throw new ConfigurationException ("Could not load SAS context class " + contextClass);
        }
        catch (InstantiationException e)
        {
            logger.error ("Caught ", e);
            throw new ConfigurationException ("Could not load SAS context class " + contextClass);
        }
        catch (IllegalAccessException e)
        {
            logger.error ("Caught ", e);
            throw new ConfigurationException ("Could not load SAS context class " + contextClass);
        }

        sasContext.configure(configuration);
        sasContext.initClient();
    }
View Full Code Here

            {
                table_file.createNewFile ();
            }
            catch (IOException ex)
            {
                throw new ConfigurationException("Failed to create table file", ex);
            }
        }
        else
        {
            if (table_file.isDirectory ())
            {
                throw new ConfigurationException("The table file is a directory! Please check " + table_file.getAbsolutePath());
            }

            if (! table_file.canRead())
            {
                throw new ConfigurationException("The table file is not readable! Please check " + table_file.getAbsolutePath());
            }

            if (! table_file.canWrite())
            {
                throw new ConfigurationException("The table file is not writable! Please check " + table_file.getAbsolutePath());
            }
        }

        try
        {
            if (_new_table)
            {
                this.server_table = new ServerTable();
                save_server_table(table_file);
            }
            else
            {
                try
                {
                    ObjectInputStream _in =
                        new ObjectInputStream(new FileInputStream(table_file));
                    server_table = (ServerTable)_in.readObject();
                    _in.close();
                }
                catch (Exception ex)
                {
                    logger.warn("Failed to read ServerTable -- creating an empty one");

                    server_table = new ServerTable();
                    save_server_table(table_file);
                }
            }
        }
        catch (FileOpFailed ex)
        {
            this.logger.error("Failed to read ServerTable", ex);
        }


        //should be set. if not, throw
        this.iorFile = configuration.getAttribute("jacorb.imr.ior_file");

        String _backup_file_str =
            configuration.getAttribute("jacorb.imr.backup_file", "");

        //set up server table backup file
        if (_backup_file_str.length() == 0)
        {
            this.logger.warn("No backup file specified!. No backup file will be created");
        }

        if (_backup_file_str.length() > 0)
        {
            table_file_backup = new File(_backup_file_str);

            // try to open backup file
            if ( ! table_file_backup.exists ())
            {
                _new_table = true;

                if (this.logger.isInfoEnabled())
                {
                    this.logger.info("Backup file " + _backup_file_str +
                                     " does not exist - autocreating it.");
                }

                try
                {
                    table_file_backup.createNewFile();
                }
                catch (IOException ex)
                {
                    throw new ConfigurationException("Failed to create backup file",
                                                     ex);
                }
            }
            else
            {
                if (table_file_backup.isDirectory ())
                {
                    throw new ConfigurationException("The backup file is a directory! Please check " + table_file_backup.getAbsolutePath());
                }

                if (! table_file_backup.canRead())
                {
                    throw new ConfigurationException("The backup file is not readable! Please check " + table_file_backup.getAbsolutePath());
                }

                if (! table_file_backup.canWrite())
                {
                    throw new ConfigurationException("The backup file is not writable! Please check " + table_file_backup.getAbsolutePath());
                }
            }
        }

        this.object_activation_retries =
View Full Code Here

TOP

Related Classes of org.jacorb.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.