Examples of BrokerOptions


Examples of org.apache.qpid.server.BrokerOptions

        when(_portEntry.getId()).thenReturn(_portEntryId);
        when(_store.getEntry(_portEntryId)).thenReturn(_portEntry);
        when(_store.getEntry(_rootId)).thenReturn(_root);
        when(_root.getChildrenIds()).thenReturn(Collections.singleton(_portEntryId));
        when(_portEntry.getType()).thenReturn(Port.class.getSimpleName());
        _options = new BrokerOptions();
        _handler = new ManagementModeStoreHandler(_store, _options);
    }
View Full Code Here

Examples of org.apache.qpid.server.BrokerOptions

        {
            // set the properties in order to resolve the defaults store settings
            setTestSystemProperty("QPID_HOME", TMP_FOLDER);
            setTestSystemProperty("QPID_WORK", TMP_FOLDER + File.separator + "work");
        }
        MemoryConfigurationEntryStore initialStore = new MemoryConfigurationEntryStore(BrokerOptions.DEFAULT_INITIAL_CONFIG_LOCATION, null, new BrokerOptions().getConfigProperties());
        ConfigurationEntry initialStoreRoot = initialStore.getRootEntry();
        assertNotNull("Initial store root entry is not found", initialStoreRoot);

         MemoryConfigurationEntryStore store = new MemoryConfigurationEntryStore(null, initialStore, Collections.<String,String>emptyMap());
View Full Code Here

Examples of org.apache.qpid.server.BrokerOptions

        }
    }

    public void testCreateJsonStore()
    {
        ConfigurationEntryStore store = _storeCreator.createStore(_userStoreLocation.getAbsolutePath(), "json", BrokerOptions.DEFAULT_INITIAL_CONFIG_LOCATION, false, new BrokerOptions().getConfigProperties());
        assertNotNull("Store was not created", store);
        assertTrue("File should exists", _userStoreLocation.exists());
        assertTrue("File size should be greater than 0", _userStoreLocation.length() > 0);
        JsonConfigurationEntryStore jsonStore = new JsonConfigurationEntryStore(_userStoreLocation.getAbsolutePath(), null, false, Collections.<String,String>emptyMap());
        Set<UUID> childrenIds = jsonStore.getRootEntry().getChildrenIds();
View Full Code Here

Examples of org.apache.qpid.server.BrokerOptions

        Set<UUID> childrenIds = entry.getChildrenIds();
        assertTrue("Unexpected children: " + childrenIds, childrenIds.isEmpty());

        if(overwrite)
        {
            ConfigurationEntryStore overwrittenStore = _storeCreator.createStore(_userStoreLocation.getAbsolutePath(), "json", BrokerOptions.DEFAULT_INITIAL_CONFIG_LOCATION, true, new BrokerOptions().getConfigProperties());
            assertNotNull("Store was not created", overwrittenStore);
            assertTrue("File should exists", _userStoreLocation.exists());
            assertTrue("File size should be greater than 0", _userStoreLocation.length() > 0);

            //check the contents reflect the test store content having been overwritten with the default store
View Full Code Here

Examples of org.apache.qpid.server.BrokerOptions

        if (_brokerType.equals(BrokerType.INTERNAL) && !existingInternalBroker())
        {
            _logger.info("Set test.virtualhosts property to: " + virtualHostsConfig);
            setSystemProperty(TEST_VIRTUALHOSTS, virtualHostsConfig);
            setSystemProperty(BrokerProperties.PROPERTY_USE_CUSTOM_RMI_SOCKET_FACTORY, "false");
            BrokerOptions options = new BrokerOptions();

            options.setConfigurationStoreType(_brokerStoreType);
            options.setConfigurationStoreLocation(testConfig);
            options.setManagementMode(managementMode);
            if (managementMode)
            {
                options.setManagementModePassword(MANAGEMENT_MODE_PASSWORD);
            }

            //Set the log config file, relying on the log4j.configuration system property
            //set on the JVM by the JUnit runner task in module.xml.
            options.setLogConfigFileLocation(_logConfigFile.getAbsolutePath());

            Broker broker = new Broker();
            _logger.info("Starting internal broker (same JVM)");
            broker.startup(options);
View Full Code Here

Examples of org.apache.qpid.server.BrokerOptions

        TaskExecutor executor = mock(TaskExecutor.class);
        when(executor.isTaskExecutorThread()).thenReturn(true);
        when(_broker.getTaskExecutor()).thenReturn(executor);

        _recovererProvider = new DefaultRecovererProvider(statisticsGatherer, _broker.getVirtualHostRegistry(),
                _broker.getLogRecorder(), _broker.getRootMessageLogger(), executor, new BrokerOptions());

        _store = mock(ConfigurationEntryStore.class);

        _resourceToDelete = new File(TMP_FOLDER, getTestName());
    }
View Full Code Here

Examples of org.apache.qpid.server.BrokerOptions

        if (_brokerType.equals(BrokerType.INTERNAL) && !existingInternalBroker())
        {
            _logger.info("Set test.virtualhosts property to: " + virtualHostsConfig);
            setSystemProperty(TEST_VIRTUALHOSTS, virtualHostsConfig);
            setSystemProperty(BrokerProperties.PROPERTY_USE_CUSTOM_RMI_SOCKET_FACTORY, "false");
            BrokerOptions options = new BrokerOptions();

            options.setConfigurationStoreType(_brokerStoreType);
            options.setConfigurationStoreLocation(testConfig);
            options.setManagementMode(managementMode);
            if (managementMode)
            {
                options.setManagementModePassword(MANAGEMENT_MODE_PASSWORD);
            }

            //Set the log config file, relying on the log4j.configuration system property
            //set on the JVM by the JUnit runner task in module.xml.
            options.setLogConfigFileLocation(_logConfigFile.getAbsolutePath());

            Broker broker = new Broker();
            _logger.info("Starting internal broker (same JVM)");
            broker.startup(options);
View Full Code Here

Examples of org.apache.qpid.server.BrokerOptions

        template.sendBodyAndHeader("amqp:queue:ping", expectedBody, "cheese", 123);
    }

    @Before
    public void setUp() throws Exception {
        BrokerOptions options = new BrokerOptions();
        options.setConfigFile("src/test/resources/config.xml");
        options.setLogConfigFile("src/test/resources/log4j.xml");

        broker = new Broker();
        broker.startup(options);

        super.setUp();
View Full Code Here

Examples of org.apache.qpid.server.BrokerOptions

    }


    @Before
    public void setUp() throws Exception {
        BrokerOptions options = new BrokerOptions();
        options.setConfigurationStoreType("memory");
        options.setInitialConfigurationLocation("src/test/resources/config.json");
        options.setLogConfigFileLocation("src/test/resources/log4j.xml");

        broker = new Broker();
        broker.startup(options);

        super.setUp();
View Full Code Here

Examples of org.apache.qpid.server.BrokerOptions

        File file = new File(this.getClass().getResource("/").getFile());

        System.setProperty(SYS_PROP_QPID_HOME, file.getPath());
        System.setProperty(SYS_PROP_QPID_WORK, file.getParent() + QPID_WORK_DIRECTORY);

        BrokerOptions options = new BrokerOptions();

        String configFile = getClass().getResource(CONFIG_XML).getFile();
        options.setConfigFile(configFile);
        URL log4j = getClass().getResource(LOG_XML);
        if (log4j != null) {
            options.setLogConfigFile(log4j.getFile());
        }

        _broker = new Broker();
        try {
            _broker.startup(options);
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.