Add JMS autoconfig support

* application.properties support for spring.jms and spring.activemq

* more tests to verify ActiveMQConnectionFactory pooling

* Groovy support and simple sample with activemq

* Groovy detection mechanism is @EnableJmsMessaging annotation
This commit is contained in:
Greg Turnquist
2013-09-20 09:23:51 -05:00
committed by Dave Syer
parent e16a0278ae
commit fa6e6fde6c
6 changed files with 209 additions and 8 deletions

View File

@@ -1,11 +1,13 @@
package org.test
@Grab("org.apache.activemq:activemq-all:5.4.0")
@Grab("org.apache.activemq:activemq-pool:5.4.0")
import java.util.concurrent.CountDownLatch
@Configuration
@Log
@Configuration
@EnableJmsMessaging
class JmsExample implements CommandLineRunner {
private CountDownLatch latch = new CountDownLatch(1)
@@ -30,7 +32,6 @@ class JmsExample implements CommandLineRunner {
session.createObjectMessage("Greetings from Spring Boot via ActiveMQ")
} as MessageCreator
log.info "Sending JMS message..."
jmsTemplate.pubSubDomain = true
jmsTemplate.send("spring-boot", messageCreator)
latch.await()
}