Search in sources :

Example 6 with ConfigurationImpl

use of org.apache.activemq.artemis.core.config.impl.ConfigurationImpl in project activemq-artemis by apache.

the class SaslKrb5LDAPSecurityTest method createArtemisServer.

private void createArtemisServer(String securityConfigScope) {
    ActiveMQJAASSecurityManager securityManager = new ActiveMQJAASSecurityManager(securityConfigScope);
    HashMap<String, Object> params = new HashMap<>();
    params.put(TransportConstants.PORT_PROP_NAME, String.valueOf(5672));
    params.put(TransportConstants.PROTOCOLS_PROP_NAME, "AMQP");
    HashMap<String, Object> amqpParams = new HashMap<>();
    amqpParams.put("saslMechanisms", "GSSAPI");
    amqpParams.put("saslLoginConfigScope", "amqp-sasl-gssapi");
    Configuration configuration = new ConfigurationImpl().setSecurityEnabled(true).addAcceptorConfiguration(new TransportConfiguration(NETTY_ACCEPTOR_FACTORY, params, "netty-amqp", amqpParams)).setJournalDirectory(ActiveMQTestBase.getJournalDir(testDir, 0, false)).setBindingsDirectory(ActiveMQTestBase.getBindingsDir(testDir, 0, false)).setPagingDirectory(ActiveMQTestBase.getPageDir(testDir, 0, false)).setLargeMessagesDirectory(ActiveMQTestBase.getLargeMessagesDir(testDir, 0, false));
    server = ActiveMQServers.newActiveMQServer(configuration, ManagementFactory.getPlatformMBeanServer(), securityManager, false);
}
Also used : TransportConfiguration(org.apache.activemq.artemis.api.core.TransportConfiguration) Configuration(org.apache.activemq.artemis.core.config.Configuration) HashMap(java.util.HashMap) ActiveMQJAASSecurityManager(org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager) TransportConfiguration(org.apache.activemq.artemis.api.core.TransportConfiguration) ConfigurationImpl(org.apache.activemq.artemis.core.config.impl.ConfigurationImpl)

Example 7 with ConfigurationImpl

use of org.apache.activemq.artemis.core.config.impl.ConfigurationImpl in project activemq-artemis by apache.

the class EmbeddedBrokerTestSupport method createConfig.

protected Configuration createConfig(final String hostAddress, final int serverID) throws Exception {
    ConfigurationImpl configuration = new ConfigurationImpl().setJMXManagementEnabled(false).setSecurityEnabled(false).setJournalMinFiles(2).setJournalFileSize(1000 * 1024).setJournalType(JournalType.NIO).setJournalDirectory(getJournalDir(serverID, false)).setBindingsDirectory(getBindingsDir(serverID, false)).setPagingDirectory(getPageDir(serverID, false)).setLargeMessagesDirectory(getLargeMessagesDir(serverID, false)).setJournalCompactMinFiles(0).setJournalCompactPercentage(0).setClusterPassword(CLUSTER_PASSWORD);
    configuration.addAddressesSetting("#", new AddressSettings().setAutoCreateJmsQueues(true).setAutoDeleteJmsQueues(true));
    configuration.addAcceptorConfiguration("netty", newURI(hostAddress, serverID));
    configuration.addConnectorConfiguration("netty-connector", newURI(hostAddress, serverID));
    return configuration;
}
Also used : AddressSettings(org.apache.activemq.artemis.core.settings.impl.AddressSettings) JMSConfigurationImpl(org.apache.activemq.artemis.jms.server.config.impl.JMSConfigurationImpl) ConfigurationImpl(org.apache.activemq.artemis.core.config.impl.ConfigurationImpl)

Example 8 with ConfigurationImpl

use of org.apache.activemq.artemis.core.config.impl.ConfigurationImpl in project activemq-artemis by apache.

the class OpenwireArtemisBaseTest method createConfig.

protected Configuration createConfig(final String hostAddress, final int serverID, Map<String, String> params) throws Exception {
    ConfigurationImpl configuration = new ConfigurationImpl().setJMXManagementEnabled(false).setSecurityEnabled(false).setJournalMinFiles(2).setJournalFileSize(1000 * 1024).setJournalType(JournalType.NIO).setJournalDirectory(getJournalDir(serverID, false)).setBindingsDirectory(getBindingsDir(serverID, false)).setPagingDirectory(getPageDir(serverID, false)).setLargeMessagesDirectory(getLargeMessagesDir(serverID, false)).setJournalCompactMinFiles(0).setJournalCompactPercentage(0).setClusterPassword(CLUSTER_PASSWORD);
    configuration.addAddressesSetting("#", new AddressSettings().setAutoCreateJmsQueues(true).setAutoDeleteJmsQueues(true));
    configuration.addAcceptorConfiguration("netty", newURI(hostAddress, serverID) + "?" + URISupport.createQueryString(params));
    configuration.addConnectorConfiguration("netty-connector", newURI(hostAddress, serverID));
    return configuration;
}
Also used : AddressSettings(org.apache.activemq.artemis.core.settings.impl.AddressSettings) JMSConfigurationImpl(org.apache.activemq.artemis.jms.server.config.impl.JMSConfigurationImpl) ConfigurationImpl(org.apache.activemq.artemis.core.config.impl.ConfigurationImpl)

Example 9 with ConfigurationImpl

use of org.apache.activemq.artemis.core.config.impl.ConfigurationImpl in project activemq-artemis by apache.

the class OpenwireArtemisBaseTest method createConfig.

// extraAcceptor takes form: "?name=value&name1=value ..."
protected Configuration createConfig(final int serverID, String extraAcceptorParams) throws Exception {
    ConfigurationImpl configuration = new ConfigurationImpl().setJMXManagementEnabled(false).setSecurityEnabled(false).setJournalMinFiles(2).setJournalFileSize(100 * 1024).setJournalType(JournalType.NIO).setJournalDirectory(getJournalDir(serverID, false)).setBindingsDirectory(getBindingsDir(serverID, false)).setPagingDirectory(getPageDir(serverID, false)).setLargeMessagesDirectory(getLargeMessagesDir(serverID, false)).setJournalCompactMinFiles(0).setJournalCompactPercentage(0).setClusterPassword(CLUSTER_PASSWORD);
    configuration.addAddressesSetting("#", new AddressSettings().setAutoCreateJmsQueues(true).setAutoDeleteJmsQueues(true));
    String fullAcceptorUri = newURI(serverID) + extraAcceptorParams;
    configuration.addAcceptorConfiguration("netty", fullAcceptorUri);
    configuration.addConnectorConfiguration("netty-connector", newURI(serverID));
    return configuration;
}
Also used : AddressSettings(org.apache.activemq.artemis.core.settings.impl.AddressSettings) JMSConfigurationImpl(org.apache.activemq.artemis.jms.server.config.impl.JMSConfigurationImpl) ConfigurationImpl(org.apache.activemq.artemis.core.config.impl.ConfigurationImpl)

Example 10 with ConfigurationImpl

use of org.apache.activemq.artemis.core.config.impl.ConfigurationImpl in project activemq-artemis by apache.

the class RemotingServiceImplTest method setUp.

@Before
public void setUp() throws Exception {
    serviceRegistry = new ServiceRegistryImpl();
    configuration = new ConfigurationImpl();
    configuration.setAcceptorConfigurations(new HashSet<TransportConfiguration>());
    remotingService = new RemotingServiceImpl(null, configuration, null, null, null, null, null, serviceRegistry);
}
Also used : RemotingServiceImpl(org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl) ServiceRegistryImpl(org.apache.activemq.artemis.core.server.impl.ServiceRegistryImpl) TransportConfiguration(org.apache.activemq.artemis.api.core.TransportConfiguration) ConfigurationImpl(org.apache.activemq.artemis.core.config.impl.ConfigurationImpl) Before(org.junit.Before)

Aggregations

ConfigurationImpl (org.apache.activemq.artemis.core.config.impl.ConfigurationImpl)45 TransportConfiguration (org.apache.activemq.artemis.api.core.TransportConfiguration)26 Configuration (org.apache.activemq.artemis.core.config.Configuration)21 AddressSettings (org.apache.activemq.artemis.core.settings.impl.AddressSettings)13 SimpleString (org.apache.activemq.artemis.api.core.SimpleString)12 Before (org.junit.Before)12 HashMap (java.util.HashMap)11 ActiveMQJAASSecurityManager (org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager)7 File (java.io.File)5 JMSConfigurationImpl (org.apache.activemq.artemis.jms.server.config.impl.JMSConfigurationImpl)5 HashSet (java.util.HashSet)4 InVMConnectorFactory (org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnectorFactory)4 ClusterConnectionConfiguration (org.apache.activemq.artemis.core.config.ClusterConnectionConfiguration)3 CoreQueueConfiguration (org.apache.activemq.artemis.core.config.CoreQueueConfiguration)3 JournalStorageManager (org.apache.activemq.artemis.core.persistence.impl.journal.JournalStorageManager)3 Role (org.apache.activemq.artemis.core.security.Role)3 OrderedExecutorFactory (org.apache.activemq.artemis.utils.actors.OrderedExecutorFactory)3 Test (org.junit.Test)3 Set (java.util.Set)2 ActiveMQDefaultConfiguration (org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration)2