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);
}
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;
}
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;
}
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;
}
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);
}
Aggregations