Search in sources :

Example 1 with EmbeddedJMS

use of org.apache.activemq.artemis.jms.server.embedded.EmbeddedJMS in project spring-boot by spring-projects.

the class ArtemisEmbeddedServerConfiguration method artemisServer.

@Bean(initMethod = "start", destroyMethod = "stop")
@ConditionalOnMissingBean
public EmbeddedJMS artemisServer(org.apache.activemq.artemis.core.config.Configuration configuration, JMSConfiguration jmsConfiguration) {
    EmbeddedJMS server = new EmbeddedJMS();
    customize(configuration);
    server.setConfiguration(configuration);
    server.setJmsConfiguration(jmsConfiguration);
    server.setRegistry(new ArtemisNoOpBindingRegistry());
    return server;
}
Also used : EmbeddedJMS(org.apache.activemq.artemis.jms.server.embedded.EmbeddedJMS) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Example 2 with EmbeddedJMS

use of org.apache.activemq.artemis.jms.server.embedded.EmbeddedJMS in project camel by apache.

the class Jms2TestSupport method doPreSetup.

/**
     * Set up the Broker
     *
     * @see CamelTestSupport#doPreSetup()
     *
     * @throws Exception
     */
@Override
protected void doPreSetup() throws Exception {
    broker = new EmbeddedJMS();
    deleteDirectory("target/data");
    port = AvailablePortFinder.getNextAvailable(33333);
    brokerUri = "tcp://localhost:" + port;
    configureBroker(this.broker);
    startBroker();
}
Also used : EmbeddedJMS(org.apache.activemq.artemis.jms.server.embedded.EmbeddedJMS)

Aggregations

EmbeddedJMS (org.apache.activemq.artemis.jms.server.embedded.EmbeddedJMS)2 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 Bean (org.springframework.context.annotation.Bean)1