Search in sources :

Example 16 with JMSConfigurationImpl

use of org.apache.activemq.artemis.jms.server.config.impl.JMSConfigurationImpl in project activemq-artemis by rh-messaging.

the class FailoverClusterTest method setUp.

@Before
public void setUp() throws Exception {
    Map<String, String> params = new HashMap<>();
    params.put("rebalanceClusterClients", "true");
    params.put("updateClusterClients", "true");
    Configuration config1 = createConfig("localhost", 1, params);
    Configuration config2 = createConfig("localhost", 2, params);
    deployClusterConfiguration(config1, 2);
    deployClusterConfiguration(config2, 1);
    server1 = new EmbeddedJMS().setConfiguration(config1).setJmsConfiguration(new JMSConfigurationImpl());
    server2 = new EmbeddedJMS().setConfiguration(config2).setJmsConfiguration(new JMSConfigurationImpl());
    clientUrl = "failover://(" + newURI(1) + "," + newURI(2) + ")";
}
Also used : EmbeddedJMS(org.apache.activemq.artemis.jms.server.embedded.EmbeddedJMS) Configuration(org.apache.activemq.artemis.core.config.Configuration) HashMap(java.util.HashMap) JMSConfigurationImpl(org.apache.activemq.artemis.jms.server.config.impl.JMSConfigurationImpl) Before(org.junit.Before)

Example 17 with JMSConfigurationImpl

use of org.apache.activemq.artemis.jms.server.config.impl.JMSConfigurationImpl in project spring-boot by spring-projects.

the class ArtemisEmbeddedServerConfiguration method artemisJmsConfiguration.

@Bean
@ConditionalOnMissingBean
JMSConfiguration artemisJmsConfiguration(ObjectProvider<JMSQueueConfiguration> queuesConfiguration, ObjectProvider<TopicConfiguration> topicsConfiguration) {
    JMSConfiguration configuration = new JMSConfigurationImpl();
    addAll(configuration.getQueueConfigurations(), queuesConfiguration);
    addAll(configuration.getTopicConfigurations(), topicsConfiguration);
    addQueues(configuration, this.properties.getEmbedded().getQueues());
    addTopics(configuration, this.properties.getEmbedded().getTopics());
    return configuration;
}
Also used : JMSConfiguration(org.apache.activemq.artemis.jms.server.config.JMSConfiguration) JMSConfigurationImpl(org.apache.activemq.artemis.jms.server.config.impl.JMSConfigurationImpl) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Example 18 with JMSConfigurationImpl

use of org.apache.activemq.artemis.jms.server.config.impl.JMSConfigurationImpl in project activemq-artemis by apache.

the class HornetQProtocolManagerTest method setUp.

@Override
@Before
public void setUp() throws Exception {
    super.setUp();
    Configuration configuration = createDefaultConfig(false);
    configuration.setPersistenceEnabled(false);
    configuration.getAcceptorConfigurations().clear();
    configuration.addAcceptorConfiguration("legacy", "tcp://localhost:61616?protocols=HORNETQ").addAcceptorConfiguration("corepr", "tcp://localhost:61617?protocols=CORE");
    configuration.addConnectorConfiguration("legacy", "tcp://localhost:61616");
    JMSConfiguration jmsConfiguration = new JMSConfigurationImpl();
    jmsConfiguration.getQueueConfigurations().add(new JMSQueueConfigurationImpl().setName("testQueue").setBindings("testQueue"));
    embeddedJMS = new EmbeddedJMS();
    embeddedJMS.setConfiguration(configuration);
    embeddedJMS.setJmsConfiguration(jmsConfiguration);
    embeddedJMS.start();
}
Also used : JMSConfiguration(org.apache.activemq.artemis.jms.server.config.JMSConfiguration) EmbeddedJMS(org.apache.activemq.artemis.jms.server.embedded.EmbeddedJMS) Configuration(org.apache.activemq.artemis.core.config.Configuration) ConnectionFactoryConfiguration(org.apache.activemq.artemis.jms.server.config.ConnectionFactoryConfiguration) JMSConfiguration(org.apache.activemq.artemis.jms.server.config.JMSConfiguration) JMSConfigurationImpl(org.apache.activemq.artemis.jms.server.config.impl.JMSConfigurationImpl) JMSQueueConfigurationImpl(org.apache.activemq.artemis.jms.server.config.impl.JMSQueueConfigurationImpl) Before(org.junit.Before)

Example 19 with JMSConfigurationImpl

use of org.apache.activemq.artemis.jms.server.config.impl.JMSConfigurationImpl in project narayana by jbosstm.

the class JmsHelper method getJmsConfiguration.

private JMSConfiguration getJmsConfiguration() {
    JMSConfiguration jmsConfiguration = new JMSConfigurationImpl();
    jmsConfiguration.getConnectionFactoryConfigurations().add(getConnectionFactoryConfiguration());
    jmsConfiguration.getQueueConfigurations().add(getQueueConfiguration());
    return jmsConfiguration;
}
Also used : JMSConfiguration(org.apache.activemq.artemis.jms.server.config.JMSConfiguration) JMSConfigurationImpl(org.apache.activemq.artemis.jms.server.config.impl.JMSConfigurationImpl)

Example 20 with JMSConfigurationImpl

use of org.apache.activemq.artemis.jms.server.config.impl.JMSConfigurationImpl in project activemq-artemis by apache.

the class ZeroPrefetchConsumerTest method createArtemisBroker.

@Override
public EmbeddedJMS createArtemisBroker() throws Exception {
    Configuration config0 = createConfig("localhost", 0);
    String coreQueueAddress = brokerZeroQueue.getQueueName();
    AddressSettings addrSettings = new AddressSettings();
    addrSettings.setQueuePrefetch(0);
    config0.getAddressesSettings().put(coreQueueAddress, addrSettings);
    EmbeddedJMS newbroker = new EmbeddedJMS().setConfiguration(config0).setJmsConfiguration(new JMSConfigurationImpl());
    return newbroker;
}
Also used : AddressSettings(org.apache.activemq.artemis.core.settings.impl.AddressSettings) EmbeddedJMS(org.apache.activemq.artemis.jms.server.embedded.EmbeddedJMS) Configuration(org.apache.activemq.artemis.core.config.Configuration) JMSConfigurationImpl(org.apache.activemq.artemis.jms.server.config.impl.JMSConfigurationImpl)

Aggregations

JMSConfigurationImpl (org.apache.activemq.artemis.jms.server.config.impl.JMSConfigurationImpl)62 Configuration (org.apache.activemq.artemis.core.config.Configuration)57 EmbeddedJMS (org.apache.activemq.artemis.jms.server.embedded.EmbeddedJMS)52 Before (org.junit.Before)19 Test (org.junit.Test)16 OpenwireArtemisBaseTest (org.apache.activemq.broker.artemiswrapper.OpenwireArtemisBaseTest)14 HashMap (java.util.HashMap)10 TransportConfiguration (org.apache.activemq.artemis.api.core.TransportConfiguration)8 JMSConfiguration (org.apache.activemq.artemis.jms.server.config.JMSConfiguration)8 MessageProducer (javax.jms.MessageProducer)6 Queue (javax.jms.Queue)6 Session (javax.jms.Session)6 ActiveMQConnectionFactory (org.apache.activemq.ActiveMQConnectionFactory)6 JndiBindingRegistry (org.apache.activemq.artemis.core.registry.JndiBindingRegistry)6 JMSServerManagerImpl (org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl)6 InVMNamingContext (org.apache.activemq.artemis.tests.unit.util.InVMNamingContext)6 ConnectionFactoryConfiguration (org.apache.activemq.artemis.jms.server.config.ConnectionFactoryConfiguration)5 JMSQueueConfigurationImpl (org.apache.activemq.artemis.jms.server.config.impl.JMSQueueConfigurationImpl)5 URI (java.net.URI)4 Connection (javax.jms.Connection)4