Examples of ConfigurationFileApplicationRegistry


Examples of org.apache.qpid.server.registry.ConfigurationFileApplicationRegistry

        {
            System.err.println("Configuration file not found:" + defaultaclConfigFile);
            fail("Configuration file not found:" + defaultaclConfigFile);
        }

        ConfigurationFileApplicationRegistry config = new ConfigurationFileApplicationRegistry(defaultaclConfigFile);

        // This is a bit evil it should be updated with QPID-1103
        config.getConfiguration().setProperty("management.enabled", "false");

        startBroker();
    }
View Full Code Here

Examples of org.apache.qpid.server.registry.ConfigurationFileApplicationRegistry

            _devlog.debug("using config file :" + configFile.getAbsolutePath());
        }

        try
        {
            ConfigurationFileApplicationRegistry registry = new ConfigurationFileApplicationRegistry(configFile);

            ApplicationRegistry.remove(1);

            ApplicationRegistry.initialise(registry);
View Full Code Here

Examples of org.apache.qpid.server.registry.ConfigurationFileApplicationRegistry

            File configFileDirectory = configFile.getParentFile();
            logConfigFile = new File(configFileDirectory, DEFAULT_LOG_CONFIG_FILENAME);
            configureLogging(logConfigFile, logWatchTime);
        }

        ConfigurationFileApplicationRegistry config = new ConfigurationFileApplicationRegistry(configFile);
        ServerConfiguration serverConfig = config.getConfiguration();
        updateManagementPort(serverConfig, commandLine.getOptionValue("m"));

        ApplicationRegistry.initialise(config);

        // We have already loaded the BrokerMessages class by this point so we
        // need to refresh the locale setting incase we had a different value in
        // the configuration.
        BrokerMessages.reload();

        // AR.initialise() sets and removes its own actor so we now need to set the actor
        // for the remainder of the startup, and the default actor if the stack is empty
        CurrentActor.set(new BrokerActor(config.getCompositeStartupMessageLogger()));
        CurrentActor.setDefault(new BrokerActor(config.getRootMessageLogger()));
        GenericActor.setDefaultMessageLogger(config.getRootMessageLogger());
       

        try
        {
            configureLoggingManagementMBean(logConfigFile, logWatchTime);
View Full Code Here

Examples of org.apache.qpid.server.registry.ConfigurationFileApplicationRegistry

        File mainFile = File.createTempFile(getClass().getName(), "config");
        mainFile.deleteOnExit();
        writeConfigFile(mainFile, false, true, null, "test");

        // Load config
        ApplicationRegistry reg = new ConfigurationFileApplicationRegistry(mainFile);
        ApplicationRegistry.initialise(reg, 1);

        // Test config
        VirtualHostRegistry virtualHostRegistry = reg.getVirtualHostRegistry();
        String defaultVirtualHost = reg.getConfiguration().getDefaultVirtualHost();
        VirtualHost virtualHost = virtualHostRegistry.getVirtualHost("test");
        Exchange exchange = virtualHost.getExchangeRegistry().getExchange(new AMQShortString("test.topic"));

        assertEquals("Incorrect default host", "test", defaultVirtualHost);
        assertEquals("Incorrect virtualhost count", 1, virtualHostRegistry.getVirtualHosts().size());
View Full Code Here

Examples of org.apache.qpid.server.registry.ConfigurationFileApplicationRegistry

        vhostsFile.deleteOnExit();
        writeConfigFile(mainFile, false, false, vhostsFile, null);   
        writeVirtualHostsFile(vhostsFile, "test");

        // Load config
        ApplicationRegistry reg = new ConfigurationFileApplicationRegistry(mainFile);
        ApplicationRegistry.initialise(reg, 1);

        // Test config
        VirtualHostRegistry virtualHostRegistry = reg.getVirtualHostRegistry();
        String defaultVirtualHost = reg.getConfiguration().getDefaultVirtualHost();
        VirtualHost virtualHost = virtualHostRegistry.getVirtualHost("test");
        Exchange exchange = virtualHost.getExchangeRegistry().getExchange(new AMQShortString("test.topic"));

        assertEquals("Incorrect default host", "test", defaultVirtualHost);
        assertEquals("Incorrect virtualhost count", 1, virtualHostRegistry.getVirtualHosts().size());
View Full Code Here

Examples of org.apache.qpid.server.registry.ConfigurationFileApplicationRegistry

        File mainFile = File.createTempFile(getClass().getName(), "config");
        mainFile.deleteOnExit();
        writeConfigFile(mainFile, false, false, vhostsFile, null);

        // Load config
        ApplicationRegistry reg = new ConfigurationFileApplicationRegistry(mainFile);
        ApplicationRegistry.initialise(reg, 1);

        // Test config
        VirtualHostRegistry virtualHostRegistry = reg.getVirtualHostRegistry();

        assertEquals("Incorrect virtualhost count", 2, virtualHostRegistry.getVirtualHosts().size());
       
        // test topic host
        VirtualHost topicVirtualHost = virtualHostRegistry.getVirtualHost("topic");
View Full Code Here

Examples of org.apache.qpid.server.registry.ConfigurationFileApplicationRegistry

        writeConfigFile(mainFile, false, true, vhostsFile, "test");
       
        // Load config
        try
        {      
            ApplicationRegistry reg = new ConfigurationFileApplicationRegistry(mainFile);
            ApplicationRegistry.initialise(reg, 1);
            fail("Different virtualhost XML configurations not allowed");
        }
        catch (ConfigurationException ce)
        {
View Full Code Here

Examples of org.apache.qpid.server.registry.ConfigurationFileApplicationRegistry

        writeMultipleVhostsConfigFile(mainFile, new File[] { vhostsFileOne, vhostsFileTwo });
       
        // Load config
        try
        {
            ApplicationRegistry reg = new ConfigurationFileApplicationRegistry(mainFile);
            ApplicationRegistry.initialise(reg, 1);
            fail("Multiple virtualhost XML configurations not allowed");
        }
        catch (ConfigurationException ce)
        {
View Full Code Here

Examples of org.apache.qpid.server.registry.ConfigurationFileApplicationRegistry

            File configFileDirectory = configFile.getParentFile();
            File logConfigFile = new File(configFileDirectory, DEFAULT_LOG_CONFIG_FILENAME);
            configureLogging(logConfigFile, logWatchConfig);
        }

        ApplicationRegistry.initialise(new ConfigurationFileApplicationRegistry(configFile));

        _logger.info("Starting Qpid.AMQP broker");

        ConnectorConfiguration connectorConfig = ApplicationRegistry.getInstance().
                getConfiguredObject(ConnectorConfiguration.class);
View Full Code Here

Examples of org.apache.qpid.server.registry.ConfigurationFileApplicationRegistry

        File mainFile = File.createTempFile(getClass().getName(), null);
        mainFile.deleteOnExit();
        writeConfigFile(mainFile, false);

        // Load config
        ApplicationRegistry reg = new ConfigurationFileApplicationRegistry(mainFile);
        try
        {
            ApplicationRegistry.initialise(reg, 1);

            // Test config
            assertFalse(reg.getSecurityManager().accessVirtualhost("test", new InetSocketAddress("127.0.0.1", 65535)));
            assertTrue(reg.getSecurityManager().accessVirtualhost("test", new InetSocketAddress("127.1.2.3", 65535)));
        }
        finally
        {
            ApplicationRegistry.remove(1);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.