use of org.apache.activemq.artemis.jms.server.config.impl.FileJMSConfiguration 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));
}
use of org.apache.activemq.artemis.jms.server.config.impl.FileJMSConfiguration in project activemq-artemis by apache.
the class XmlConfigPluginTest method createServerFromConfig.
private ActiveMQServer createServerFromConfig(String configFileName) throws Exception {
FileConfiguration fc = new FileConfiguration();
FileJMSConfiguration fileConfiguration = new FileJMSConfiguration();
FileDeploymentManager deploymentManager = new FileDeploymentManager(configFileName);
deploymentManager.addDeployable(fc);
deploymentManager.addDeployable(fileConfiguration);
deploymentManager.readConfiguration();
return addServer(new ActiveMQServerImpl(fc));
}
use of org.apache.activemq.artemis.jms.server.config.impl.FileJMSConfiguration in project activemq-artemis by apache.
the class EmbeddedJMS method start.
@Override
public EmbeddedJMS start() throws Exception {
super.initStart();
if (jmsConfiguration != null) {
serverManager = new JMSServerManagerImpl(activeMQServer, jmsConfiguration);
} else {
FileJMSConfiguration fileConfiguration = new FileJMSConfiguration();
FileDeploymentManager deploymentManager;
if (configResourcePath != null) {
deploymentManager = new FileDeploymentManager(configResourcePath);
} else {
deploymentManager = new FileDeploymentManager();
}
deploymentManager.addDeployable(fileConfiguration);
deploymentManager.readConfiguration();
serverManager = new JMSServerManagerImpl(activeMQServer, fileConfiguration);
}
if (registry == null) {
if (context != null)
registry = new JndiBindingRegistry(context);
else
registry = new MapBindingRegistry();
}
serverManager.setRegistry(registry);
serverManager.start();
return this;
}
Aggregations