use of org.apache.activemq.artemis.core.registry.MapBindingRegistry 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