use of org.apache.activemq.artemis.core.config.FileDeploymentManager in project activemq-artemis by apache.
the class FileConfigurationTest method testBrokerPlugin.
@Test
public void testBrokerPlugin() throws Exception {
FileConfiguration fc = new FileConfiguration();
FileDeploymentManager deploymentManager = new FileDeploymentManager("brokerPlugin.xml");
deploymentManager.addDeployable(fc);
deploymentManager.readConfiguration();
List<ActiveMQServerPlugin> brokerPlugins = fc.getBrokerPlugins();
assertEquals(2, brokerPlugins.size());
assertTrue(brokerPlugins.get(0) instanceof EmptyPlugin1);
assertTrue(brokerPlugins.get(1) instanceof EmptyPlugin2);
}
use of org.apache.activemq.artemis.core.config.FileDeploymentManager in project activemq-artemis by apache.
the class DefaultsFileConfigurationTest method createConfiguration.
// Protected ---------------------------------------------------------------------------------------------
@Override
protected Configuration createConfiguration() throws Exception {
FileConfiguration fc = new FileConfiguration();
FileDeploymentManager deploymentManager = new FileDeploymentManager("ConfigurationTest-defaults.xml");
deploymentManager.addDeployable(fc);
deploymentManager.readConfiguration();
return fc;
}
use of org.apache.activemq.artemis.core.config.FileDeploymentManager in project activemq-artemis by apache.
the class JMSServerStartStopTest method setUp.
@Override
@Before
public void setUp() throws Exception {
FileConfiguration fc = new FileConfiguration();
FileJMSConfiguration fileConfiguration = new FileJMSConfiguration();
FileDeploymentManager deploymentManager = new FileDeploymentManager("server-start-stop-config1.xml");
deploymentManager.addDeployable(fc);
deploymentManager.addDeployable(fileConfiguration);
deploymentManager.readConfiguration();
ActiveMQJAASSecurityManager sm = new ActiveMQJAASSecurityManager(InVMLoginModule.class.getName(), new SecurityConfiguration());
ActiveMQServer server = addServer(new ActiveMQServerImpl(fc, sm));
jmsServer = new JMSServerManagerImpl(server, fileConfiguration);
jmsServer.setRegistry(null);
}
use of org.apache.activemq.artemis.core.config.FileDeploymentManager in project activemq-artemis by apache.
the class JMSServerConfigParserTest method testParsing.
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
@Test
public void testParsing() throws Exception {
Configuration config = createDefaultInVMConfig().addConnectorConfiguration("netty", new TransportConfiguration());
String conf = "activemq-jms-for-JMSServerDeployerTest.xml";
FileJMSConfiguration jmsconfig = new FileJMSConfiguration();
FileDeploymentManager deploymentManager = new FileDeploymentManager(conf);
deploymentManager.addDeployable(jmsconfig);
deploymentManager.readConfiguration();
assertEquals(1, jmsconfig.getQueueConfigurations().size());
JMSQueueConfiguration queueConfig = jmsconfig.getQueueConfigurations().get(0);
assertEquals("fullConfigurationQueue", queueConfig.getName());
assertEquals(1, jmsconfig.getTopicConfigurations().size());
TopicConfiguration topicConfig = jmsconfig.getTopicConfigurations().get(0);
assertEquals("fullConfigurationTopic", topicConfig.getName());
}
use of org.apache.activemq.artemis.core.config.FileDeploymentManager in project activemq-artemis by apache.
the class ConfigurationTest method getActiveMQServer.
protected ActiveMQServer getActiveMQServer(String brokerConfig) throws Exception {
FileConfiguration fc = new FileConfiguration();
FileJMSConfiguration fileConfiguration = new FileJMSConfiguration();
FileDeploymentManager deploymentManager = new FileDeploymentManager(brokerConfig);
deploymentManager.addDeployable(fc);
deploymentManager.addDeployable(fileConfiguration);
deploymentManager.readConfiguration();
ActiveMQJAASSecurityManager sm = new ActiveMQJAASSecurityManager(InVMLoginModule.class.getName(), new SecurityConfiguration());
return addServer(new ActiveMQServerImpl(fc, sm));
}
Aggregations