Package org.apache.qpid.server.configuration

Examples of org.apache.qpid.server.configuration.ServerConfiguration


        createSession(protocolSession, _applicationRegistry, codecFactory);
        _logger.info("Protocol session created for:" + protocolSession.getRemoteAddress());

        final QpidProtocolCodecFilter pcf = new QpidProtocolCodecFilter(codecFactory);
        final ServerConfiguration config = _applicationRegistry.getConfiguration();
       
        String keystorePath = config.getKeystorePath();
        String keystorePassword = config.getKeystorePassword();
        String certType = config.getCertType();
        SSLContextFactory sslContextFactory = null;
        boolean isSsl = false;
        if (config.getEnableSSL() && isSSLClient(config, protocolSession))
        {
            sslContextFactory = new SSLContextFactory(keystorePath, keystorePassword, certType);
            isSsl = true;
        }
        if (config.getEnableExecutorPool())
        {
            if (isSsl)
            {
                protocolSession.getFilterChain().addAfter("AsynchronousReadFilter", "sslFilter",
                                                          new SSLFilter(sslContextFactory.buildServerContext()));
View Full Code Here


            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);
       
        configureLoggingManagementMBean(logConfigFile, logWatchTime);

        ConfigurationManagementMBean configMBean = new ConfigurationManagementMBean();
        configMBean.register();
       
        //fixme .. use QpidProperties.getVersionString when we have fixed the classpath issues
        // that are causing the broker build to pick up the wrong properties file and hence say
        // Starting Qpid Client
        _brokerLogger.info("Starting Qpid Broker " + QpidProperties.getReleaseVersion()
                           + " build: " + QpidProperties.getBuildVersion());

        ByteBuffer.setUseDirectBuffers(serverConfig.getEnableDirectBuffers());

        // the MINA default is currently to use the pooled allocator although this may change in future
        // once more testing of the performance of the simple allocator has been done
        if (!serverConfig.getEnablePooledAllocator())
        {
            ByteBuffer.setAllocator(new FixedSizeByteBufferAllocator());
        }

        if(serverConfig.getUseBiasedWrites())
        {
            System.setProperty("org.apache.qpid.use_write_biased_pool","true");
        }

        int port = serverConfig.getPort();

        String portStr = commandLine.getOptionValue("p");
        if (portStr != null)
        {
            try
View Full Code Here

    private ServerConfiguration _config;
   
    public TestApplicationRegistry() throws ConfigurationException
    {
      super(new ServerConfiguration(new PropertiesConfiguration()));
    }
View Full Code Here

    public void setUp() throws Exception
    {
        super.setUp();
        PropertiesConfiguration configuration = new PropertiesConfiguration();
        configuration.setProperty("virtualhosts.virtualhost.test.store.class", TestableMemoryMessageStore.class.getName());
        _registry = new TestApplicationRegistry(new ServerConfiguration(configuration));
        ApplicationRegistry.initialise(_registry);
        _virtualHost = _registry.getVirtualHostRegistry().getVirtualHost("test");       

        _messageStore = _virtualHost.getMessageStore();
View Full Code Here

public class NullApplicationRegistry extends ApplicationRegistry
{
    public NullApplicationRegistry() throws ConfigurationException
    {
        super(new ServerConfiguration(new PropertiesConfiguration()));
    }
View Full Code Here

public class ConfigurationFileApplicationRegistry extends ApplicationRegistry
{

    public ConfigurationFileApplicationRegistry(File configurationURL) throws ConfigurationException
    {
        super(new ServerConfiguration(configurationURL));
    }
View Full Code Here

    protected void setUp() throws Exception
    {
        super.setUp();

        //the factory needs a registry instance
        ApplicationRegistry.initialise(new TestApplicationRegistry(new ServerConfiguration(new XMLConfiguration())));
    }
View Full Code Here

    protected void createBroker() throws Exception
    {
        _started = true;
        CurrentActor.set(new TestLogActor(new SystemOutMessageLogger()));

        _configuration = new ServerConfiguration(_configXml);

        configure();

        _registry = new TestApplicationRegistry(_configuration);
        ApplicationRegistry.initialise(_registry);
View Full Code Here

    public void setUp() throws Exception
    {
        PropertiesConfiguration properties = new PropertiesConfiguration();
        properties.addProperty("plugin-directory", PLUGIN_DIRECTORY);
        properties.addProperty("cache-directory", CACHE_DIRECTORY);
        ServerConfiguration config = new ServerConfiguration(properties);

        // This Test requires an application Registry
        ApplicationRegistry.initialise(new TestApplicationRegistry(config));
        _registry = ApplicationRegistry.getInstance();
    }
View Full Code Here

        }
    }

    private VirtualHost createVirtualHost(String vhostName, File config) throws Exception
    {
        _configuration = new ServerConfiguration(new XMLConfiguration(config));

        _registry = new TestApplicationRegistry(_configuration);
        ApplicationRegistry.initialise(_registry);

        return _registry.getVirtualHostRegistry().getVirtualHost(vhostName);
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.configuration.ServerConfiguration

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.