Search in sources :

Example 6 with FileJMSConfiguration

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));
}
Also used : FileConfiguration(org.apache.activemq.artemis.core.config.impl.FileConfiguration) FileJMSConfiguration(org.apache.activemq.artemis.jms.server.config.impl.FileJMSConfiguration) ActiveMQJAASSecurityManager(org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager) InVMLoginModule(org.apache.activemq.artemis.spi.core.security.jaas.InVMLoginModule) SecurityConfiguration(org.apache.activemq.artemis.core.config.impl.SecurityConfiguration) FileDeploymentManager(org.apache.activemq.artemis.core.config.FileDeploymentManager) ActiveMQServerImpl(org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl)

Example 7 with FileJMSConfiguration

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

Example 8 with FileJMSConfiguration

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;
}
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)8 FileJMSConfiguration (org.apache.activemq.artemis.jms.server.config.impl.FileJMSConfiguration)8 FileConfiguration (org.apache.activemq.artemis.core.config.impl.FileConfiguration)6 ActiveMQServerImpl (org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl)3 ActiveMQJAASSecurityManager (org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager)3 File (java.io.File)2 SecurityConfiguration (org.apache.activemq.artemis.core.config.impl.SecurityConfiguration)2 ActiveMQServer (org.apache.activemq.artemis.core.server.ActiveMQServer)2 JMSQueueConfiguration (org.apache.activemq.artemis.jms.server.config.JMSQueueConfiguration)2 TopicConfiguration (org.apache.activemq.artemis.jms.server.config.TopicConfiguration)2 JMSServerManagerImpl (org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl)2 InVMLoginModule (org.apache.activemq.artemis.spi.core.security.jaas.InVMLoginModule)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 TransportConfiguration (org.apache.activemq.artemis.api.core.TransportConfiguration)1 Configuration (org.apache.activemq.artemis.core.config.Configuration)1 CoreAddressConfiguration (org.apache.activemq.artemis.core.config.CoreAddressConfiguration)1 CoreQueueConfiguration (org.apache.activemq.artemis.core.config.CoreQueueConfiguration)1 StoreConfiguration (org.apache.activemq.artemis.core.config.StoreConfiguration)1 DatabaseStorageConfiguration (org.apache.activemq.artemis.core.config.storage.DatabaseStorageConfiguration)1