Search in sources :

Example 1 with MapBindingRegistry

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;
}
Also used : MapBindingRegistry(org.apache.activemq.artemis.core.registry.MapBindingRegistry) FileJMSConfiguration(org.apache.activemq.artemis.jms.server.config.impl.FileJMSConfiguration) JMSServerManagerImpl(org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl) JndiBindingRegistry(org.apache.activemq.artemis.core.registry.JndiBindingRegistry) FileDeploymentManager(org.apache.activemq.artemis.core.config.FileDeploymentManager)

Aggregations

FileDeploymentManager (org.apache.activemq.artemis.core.config.FileDeploymentManager)1 JndiBindingRegistry (org.apache.activemq.artemis.core.registry.JndiBindingRegistry)1 MapBindingRegistry (org.apache.activemq.artemis.core.registry.MapBindingRegistry)1 FileJMSConfiguration (org.apache.activemq.artemis.jms.server.config.impl.FileJMSConfiguration)1 JMSServerManagerImpl (org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl)1