From 1bb5dc205da6027314d09bdc5702b3e4ef5f3668 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 29 Sep 2016 11:51:33 +0100 Subject: [PATCH] Update samples to use Artemis in place of HornetQ Closes gh-7057 --- spring-boot-cli/samples/jms.groovy | 11 +++-------- .../boot/cli/SampleIntegrationTests.java | 2 +- .../spring-boot-sample-jta-atomikos/pom.xml | 6 +++--- .../src/main/resources/application.properties | 6 +----- .../spring-boot-sample-jta-bitronix/pom.xml | 6 +++--- .../src/main/resources/application.properties | 3 --- .../spring-boot-sample-jta-narayana/pom.xml | 6 +++--- .../src/main/resources/application.properties | 4 ---- 8 files changed, 14 insertions(+), 30 deletions(-) diff --git a/spring-boot-cli/samples/jms.groovy b/spring-boot-cli/samples/jms.groovy index f824d61814..b10ca4eb07 100644 --- a/spring-boot-cli/samples/jms.groovy +++ b/spring-boot-cli/samples/jms.groovy @@ -1,9 +1,8 @@ package org.test -@Grab("spring-boot-starter-hornetq") -@Grab("hornetq-jms-server") +@Grab("spring-boot-starter-artemis") +@Grab("artemis-jms-server") import java.util.concurrent.CountDownLatch -import org.hornetq.jms.server.config.impl.JMSQueueConfigurationImpl @Log @Configuration @@ -17,7 +16,7 @@ class JmsExample implements CommandLineRunner { void run(String... args) { def messageCreator = { session -> - session.createObjectMessage("Greetings from Spring Boot via HornetQ") + session.createObjectMessage("Greetings from Spring Boot via Artemis") } as MessageCreator log.info "Sending JMS message..." jmsTemplate.send("spring-boot", messageCreator) @@ -31,8 +30,4 @@ class JmsExample implements CommandLineRunner { latch.countDown() } - @Bean JMSQueueConfigurationImpl springBootQueue() { - new JMSQueueConfigurationImpl('spring-boot', null, false) - } - } diff --git a/spring-boot-cli/src/test/java/org/springframework/boot/cli/SampleIntegrationTests.java b/spring-boot-cli/src/test/java/org/springframework/boot/cli/SampleIntegrationTests.java index 66966e2b66..cdf05b8414 100644 --- a/spring-boot-cli/src/test/java/org/springframework/boot/cli/SampleIntegrationTests.java +++ b/spring-boot-cli/src/test/java/org/springframework/boot/cli/SampleIntegrationTests.java @@ -145,7 +145,7 @@ public class SampleIntegrationTests { @Test public void jmsSample() throws Exception { String output = this.cli.run("jms.groovy"); - assertThat(output).contains("Received Greetings from Spring Boot via HornetQ"); + assertThat(output).contains("Received Greetings from Spring Boot via Artemis"); } @Test diff --git a/spring-boot-samples/spring-boot-sample-jta-atomikos/pom.xml b/spring-boot-samples/spring-boot-sample-jta-atomikos/pom.xml index 04d14d35d2..fff2bbac83 100644 --- a/spring-boot-samples/spring-boot-sample-jta-atomikos/pom.xml +++ b/spring-boot-samples/spring-boot-sample-jta-atomikos/pom.xml @@ -33,11 +33,11 @@ org.springframework.boot - spring-boot-starter-hornetq + spring-boot-starter-artemis - org.hornetq - hornetq-jms-server + org.apache.activemq + artemis-jms-server com.h2database diff --git a/spring-boot-samples/spring-boot-sample-jta-atomikos/src/main/resources/application.properties b/spring-boot-samples/spring-boot-sample-jta-atomikos/src/main/resources/application.properties index 62806e0ea8..03d6037e93 100644 --- a/spring-boot-samples/spring-boot-sample-jta-atomikos/src/main/resources/application.properties +++ b/spring-boot-samples/spring-boot-sample-jta-atomikos/src/main/resources/application.properties @@ -1,5 +1 @@ -spring.hornetq.mode=embedded -spring.hornetq.embedded.enabled=true -spring.hornetq.embedded.queues=accounts - -logging.level.com.atomikos=WARN +logging.level.com.atomikos=WARN \ No newline at end of file diff --git a/spring-boot-samples/spring-boot-sample-jta-bitronix/pom.xml b/spring-boot-samples/spring-boot-sample-jta-bitronix/pom.xml index 2d118191cb..b9461b23e7 100644 --- a/spring-boot-samples/spring-boot-sample-jta-bitronix/pom.xml +++ b/spring-boot-samples/spring-boot-sample-jta-bitronix/pom.xml @@ -33,11 +33,11 @@ org.springframework.boot - spring-boot-starter-hornetq + spring-boot-starter-artemis - org.hornetq - hornetq-jms-server + org.apache.activemq + artemis-jms-server com.h2database diff --git a/spring-boot-samples/spring-boot-sample-jta-bitronix/src/main/resources/application.properties b/spring-boot-samples/spring-boot-sample-jta-bitronix/src/main/resources/application.properties index ca501b18cc..e69de29bb2 100644 --- a/spring-boot-samples/spring-boot-sample-jta-bitronix/src/main/resources/application.properties +++ b/spring-boot-samples/spring-boot-sample-jta-bitronix/src/main/resources/application.properties @@ -1,3 +0,0 @@ -spring.hornetq.mode=embedded -spring.hornetq.embedded.enabled=true -spring.hornetq.embedded.queues=accounts diff --git a/spring-boot-samples/spring-boot-sample-jta-narayana/pom.xml b/spring-boot-samples/spring-boot-sample-jta-narayana/pom.xml index 8e5c5a6dcd..6155b9fe64 100644 --- a/spring-boot-samples/spring-boot-sample-jta-narayana/pom.xml +++ b/spring-boot-samples/spring-boot-sample-jta-narayana/pom.xml @@ -28,11 +28,11 @@ org.springframework.boot - spring-boot-starter-hornetq + spring-boot-starter-artemis - org.hornetq - hornetq-jms-server + org.apache.activemq + artemis-jms-server com.h2database diff --git a/spring-boot-samples/spring-boot-sample-jta-narayana/src/main/resources/application.properties b/spring-boot-samples/spring-boot-sample-jta-narayana/src/main/resources/application.properties index ffbc046eb3..cac39b5dc1 100644 --- a/spring-boot-samples/spring-boot-sample-jta-narayana/src/main/resources/application.properties +++ b/spring-boot-samples/spring-boot-sample-jta-narayana/src/main/resources/application.properties @@ -1,5 +1 @@ -spring.hornetq.mode=embedded -spring.hornetq.embedded.enabled=true -spring.hornetq.embedded.queues=accounts - logging.level.com.arjuna=INFO \ No newline at end of file