Browse Source

Fix Artemis embedded mode condition

This commit prevents the Artemis embedded mode to kick-in if the
`EmbeddedJMS` class it not in the classpath. The previous condition would
match if only `artemis-server` was on the classpath while
`artemis-jms-server` is actually required.

Closes gh-5452
pull/5489/head
Stephane Nicoll 10 years ago
parent
commit
b1b84a358d
  1. 4
      spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/artemis/ArtemisConnectionFactoryFactory.java
  2. 4
      spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

4
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/artemis/ArtemisConnectionFactoryFactory.java

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2015 the original author or authors. * Copyright 2012-2016 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -42,7 +42,7 @@ import org.springframework.util.ClassUtils;
*/ */
class ArtemisConnectionFactoryFactory { class ArtemisConnectionFactoryFactory {
static final String EMBEDDED_JMS_CLASS = "org.apache.activemq.artemis.core.server.embedded.EmbeddedActiveMQ"; static final String EMBEDDED_JMS_CLASS = "org.apache.activemq.artemis.jms.server.embedded.EmbeddedJMS";
private final ArtemisProperties properties; private final ArtemisProperties properties;

4
spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

@ -3393,7 +3393,9 @@ resolved against their provided names.
Apache Artemis was formed in 2015 when HornetQ was donated to the Apache Foundation. All Apache Artemis was formed in 2015 when HornetQ was donated to the Apache Foundation. All
the features listed in the <<boot-features-hornetq>> section below can be applied to the features listed in the <<boot-features-hornetq>> section below can be applied to
Artemis. Simply replace `+++spring.hornetq.*+++` properties with `+++spring.artemis.*+++` Artemis. Simply replace `+++spring.hornetq.*+++` properties with `+++spring.artemis.*+++`
and use `spring-boot-starter-artemis` instead of `spring-boot-starter-hornetq`. and use `spring-boot-starter-artemis` instead of `spring-boot-starter-hornetq`. If you
want to embed Artemis, make sure to add `org.apache.activemq:artemis-jms-server` to the
dependencies of your application.
NOTE: You should not try and use Artemis and HornetQ and the same time. NOTE: You should not try and use Artemis and HornetQ and the same time.

Loading…
Cancel
Save