Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
6bd7a2fe
Commit
6bd7a2fe
authored
Jul 13, 2016
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deprecate HornetQ support
Closes gh-6377
parent
8319291e
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
77 additions
and
11 deletions
+77
-11
HornetQAutoConfiguration.java
...t/autoconfigure/jms/hornetq/HornetQAutoConfiguration.java
+3
-1
HornetQConfigurationCustomizer.java
...configure/jms/hornetq/HornetQConfigurationCustomizer.java
+3
-1
HornetQConnectionFactoryConfiguration.java
...re/jms/hornetq/HornetQConnectionFactoryConfiguration.java
+2
-0
HornetQConnectionFactoryFactory.java
...onfigure/jms/hornetq/HornetQConnectionFactoryFactory.java
+3
-1
HornetQEmbeddedConfigurationFactory.java
...gure/jms/hornetq/HornetQEmbeddedConfigurationFactory.java
+2
-0
HornetQEmbeddedServerConfiguration.java
...igure/jms/hornetq/HornetQEmbeddedServerConfiguration.java
+2
-0
HornetQMode.java
...framework/boot/autoconfigure/jms/hornetq/HornetQMode.java
+3
-1
HornetQNoOpBindingRegistry.java
...autoconfigure/jms/hornetq/HornetQNoOpBindingRegistry.java
+3
-1
HornetQProperties.java
...ork/boot/autoconfigure/jms/hornetq/HornetQProperties.java
+2
-0
HornetQXAConnectionFactoryConfiguration.java
.../jms/hornetq/HornetQXAConnectionFactoryConfiguration.java
+2
-0
SpringBootHornetQConnectionFactory.java
...igure/jms/hornetq/SpringBootHornetQConnectionFactory.java
+2
-0
SpringBootHornetQXAConnectionFactory.java
...ure/jms/hornetq/SpringBootHornetQXAConnectionFactory.java
+2
-0
HornetQAutoConfigurationTests.java
...oconfigure/jms/hornetq/HornetQAutoConfigurationTests.java
+2
-0
HornetQEmbeddedConfigurationFactoryTests.java
...jms/hornetq/HornetQEmbeddedConfigurationFactoryTests.java
+2
-0
spring-boot-features.adoc
spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
+44
-6
No files found.
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQAutoConfiguration.java
View file @
6bd7a2fe
/*
/*
* Copyright 2012-201
5
the original author or authors.
* Copyright 2012-201
6
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.
...
@@ -41,6 +41,7 @@ import org.springframework.context.annotation.Import;
...
@@ -41,6 +41,7 @@ import org.springframework.context.annotation.Import;
* @author Phillip Webb
* @author Phillip Webb
* @since 1.1.0
* @since 1.1.0
* @see HornetQProperties
* @see HornetQProperties
* @deprecated as of 1.4 in favor of the artemis support
*/
*/
@Configuration
@Configuration
@AutoConfigureBefore
(
JmsAutoConfiguration
.
class
)
@AutoConfigureBefore
(
JmsAutoConfiguration
.
class
)
...
@@ -51,6 +52,7 @@ import org.springframework.context.annotation.Import;
...
@@ -51,6 +52,7 @@ import org.springframework.context.annotation.Import;
@Import
({
HornetQEmbeddedServerConfiguration
.
class
,
@Import
({
HornetQEmbeddedServerConfiguration
.
class
,
HornetQXAConnectionFactoryConfiguration
.
class
,
HornetQXAConnectionFactoryConfiguration
.
class
,
HornetQConnectionFactoryConfiguration
.
class
})
HornetQConnectionFactoryConfiguration
.
class
})
@Deprecated
public
class
HornetQAutoConfiguration
{
public
class
HornetQAutoConfiguration
{
}
}
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQConfigurationCustomizer.java
View file @
6bd7a2fe
/*
/*
* Copyright 2012-201
4
the original author or authors.
* Copyright 2012-201
6
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.
...
@@ -27,7 +27,9 @@ import org.hornetq.jms.server.embedded.EmbeddedJMS;
...
@@ -27,7 +27,9 @@ import org.hornetq.jms.server.embedded.EmbeddedJMS;
* @author Phillip Webb
* @author Phillip Webb
* @since 1.1.0
* @since 1.1.0
* @see HornetQAutoConfiguration
* @see HornetQAutoConfiguration
* @deprecated as of 1.4 in favor of the artemis support
*/
*/
@Deprecated
public
interface
HornetQConfigurationCustomizer
{
public
interface
HornetQConfigurationCustomizer
{
/**
/**
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQConnectionFactoryConfiguration.java
View file @
6bd7a2fe
...
@@ -30,9 +30,11 @@ import org.springframework.context.annotation.Configuration;
...
@@ -30,9 +30,11 @@ import org.springframework.context.annotation.Configuration;
*
*
* @author Phillip Webb
* @author Phillip Webb
* @since 1.2.0
* @since 1.2.0
* @deprecated as of 1.4 in favor of the artemis support
*/
*/
@Configuration
@Configuration
@ConditionalOnMissingBean
(
ConnectionFactory
.
class
)
@ConditionalOnMissingBean
(
ConnectionFactory
.
class
)
@Deprecated
class
HornetQConnectionFactoryConfiguration
{
class
HornetQConnectionFactoryConfiguration
{
@Bean
@Bean
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQConnectionFactoryFactory.java
View file @
6bd7a2fe
/*
/*
* Copyright 2012-201
5
the original author or authors.
* Copyright 2012-201
6
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.
...
@@ -40,7 +40,9 @@ import org.springframework.util.ClassUtils;
...
@@ -40,7 +40,9 @@ import org.springframework.util.ClassUtils;
* @author Phillip Webb
* @author Phillip Webb
* @author Stephane Nicoll
* @author Stephane Nicoll
* @since 1.2.0
* @since 1.2.0
* @deprecated as of 1.4 in favor of the artemis support
*/
*/
@Deprecated
class
HornetQConnectionFactoryFactory
{
class
HornetQConnectionFactoryFactory
{
static
final
String
EMBEDDED_JMS_CLASS
=
"org.hornetq.jms.server.embedded.EmbeddedJMS"
;
static
final
String
EMBEDDED_JMS_CLASS
=
"org.hornetq.jms.server.embedded.EmbeddedJMS"
;
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQEmbeddedConfigurationFactory.java
View file @
6bd7a2fe
...
@@ -34,7 +34,9 @@ import org.springframework.boot.autoconfigure.jms.hornetq.HornetQProperties.Embe
...
@@ -34,7 +34,9 @@ import org.springframework.boot.autoconfigure.jms.hornetq.HornetQProperties.Embe
* @author Stephane Nicoll
* @author Stephane Nicoll
* @author Phillip Webb
* @author Phillip Webb
* @since 1.1.0
* @since 1.1.0
* @deprecated as of 1.4 in favor of the artemis support
*/
*/
@Deprecated
class
HornetQEmbeddedConfigurationFactory
{
class
HornetQEmbeddedConfigurationFactory
{
private
static
final
Log
logger
=
LogFactory
private
static
final
Log
logger
=
LogFactory
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQEmbeddedServerConfiguration.java
View file @
6bd7a2fe
...
@@ -41,10 +41,12 @@ import org.springframework.core.annotation.AnnotationAwareOrderComparator;
...
@@ -41,10 +41,12 @@ import org.springframework.core.annotation.AnnotationAwareOrderComparator;
* @author Phillip Webb
* @author Phillip Webb
* @author Stephane Nicoll
* @author Stephane Nicoll
* @since 1.2.0
* @since 1.2.0
* @deprecated as of 1.4 in favor of the artemis support
*/
*/
@Configuration
@Configuration
@ConditionalOnClass
(
name
=
HornetQConnectionFactoryFactory
.
EMBEDDED_JMS_CLASS
)
@ConditionalOnClass
(
name
=
HornetQConnectionFactoryFactory
.
EMBEDDED_JMS_CLASS
)
@ConditionalOnProperty
(
prefix
=
"spring.hornetq.embedded"
,
name
=
"enabled"
,
havingValue
=
"true"
,
matchIfMissing
=
true
)
@ConditionalOnProperty
(
prefix
=
"spring.hornetq.embedded"
,
name
=
"enabled"
,
havingValue
=
"true"
,
matchIfMissing
=
true
)
@Deprecated
class
HornetQEmbeddedServerConfiguration
{
class
HornetQEmbeddedServerConfiguration
{
private
final
HornetQProperties
properties
;
private
final
HornetQProperties
properties
;
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQMode.java
View file @
6bd7a2fe
/*
/*
* Copyright 2012-201
4
the original author or authors.
* Copyright 2012-201
6
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.
...
@@ -21,7 +21,9 @@ package org.springframework.boot.autoconfigure.jms.hornetq;
...
@@ -21,7 +21,9 @@ package org.springframework.boot.autoconfigure.jms.hornetq;
*
*
* @author Stephane Nicoll
* @author Stephane Nicoll
* @since 1.1.0
* @since 1.1.0
* @deprecated as of 1.4 in favor of the artemis support
*/
*/
@Deprecated
public
enum
HornetQMode
{
public
enum
HornetQMode
{
/**
/**
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQNoOpBindingRegistry.java
View file @
6bd7a2fe
/*
/*
* Copyright 2012-201
4
the original author or authors.
* Copyright 2012-201
6
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.
...
@@ -23,7 +23,9 @@ import org.hornetq.spi.core.naming.BindingRegistry;
...
@@ -23,7 +23,9 @@ import org.hornetq.spi.core.naming.BindingRegistry;
*
*
* @author Stephane Nicoll
* @author Stephane Nicoll
* @since 1.1.0
* @since 1.1.0
* @deprecated as of 1.4 in favor of the artemis support
*/
*/
@Deprecated
public
class
HornetQNoOpBindingRegistry
implements
BindingRegistry
{
public
class
HornetQNoOpBindingRegistry
implements
BindingRegistry
{
@Override
@Override
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQProperties.java
View file @
6bd7a2fe
...
@@ -30,8 +30,10 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
...
@@ -30,8 +30,10 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
*
*
* @author Stephane Nicoll
* @author Stephane Nicoll
* @since 1.1.0
* @since 1.1.0
* @deprecated as of 1.4 in favor of the artemis support
*/
*/
@ConfigurationProperties
(
prefix
=
"spring.hornetq"
)
@ConfigurationProperties
(
prefix
=
"spring.hornetq"
)
@Deprecated
public
class
HornetQProperties
{
public
class
HornetQProperties
{
/**
/**
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQXAConnectionFactoryConfiguration.java
View file @
6bd7a2fe
...
@@ -35,11 +35,13 @@ import org.springframework.context.annotation.Primary;
...
@@ -35,11 +35,13 @@ import org.springframework.context.annotation.Primary;
*
*
* @author Phillip Webb
* @author Phillip Webb
* @since 1.2.0
* @since 1.2.0
* @deprecated as of 1.4 in favor of the artemis support
*/
*/
@Configuration
@Configuration
@ConditionalOnMissingBean
(
ConnectionFactory
.
class
)
@ConditionalOnMissingBean
(
ConnectionFactory
.
class
)
@ConditionalOnClass
(
TransactionManager
.
class
)
@ConditionalOnClass
(
TransactionManager
.
class
)
@ConditionalOnBean
(
XAConnectionFactoryWrapper
.
class
)
@ConditionalOnBean
(
XAConnectionFactoryWrapper
.
class
)
@Deprecated
class
HornetQXAConnectionFactoryConfiguration
{
class
HornetQXAConnectionFactoryConfiguration
{
@Primary
@Primary
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/hornetq/SpringBootHornetQConnectionFactory.java
View file @
6bd7a2fe
...
@@ -30,7 +30,9 @@ import org.springframework.util.StringUtils;
...
@@ -30,7 +30,9 @@ import org.springframework.util.StringUtils;
*
*
* @author Stéphane Lagraulet
* @author Stéphane Lagraulet
* @author Stephane Nicoll
* @author Stephane Nicoll
* @deprecated as of 1.4 in favor of the artemis support
*/
*/
@Deprecated
class
SpringBootHornetQConnectionFactory
extends
HornetQConnectionFactory
{
class
SpringBootHornetQConnectionFactory
extends
HornetQConnectionFactory
{
private
final
HornetQProperties
properties
;
private
final
HornetQProperties
properties
;
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/hornetq/SpringBootHornetQXAConnectionFactory.java
View file @
6bd7a2fe
...
@@ -30,7 +30,9 @@ import org.springframework.util.StringUtils;
...
@@ -30,7 +30,9 @@ import org.springframework.util.StringUtils;
*
*
* @author Stéphane Lagraulet
* @author Stéphane Lagraulet
* @author Stephane Nicoll
* @author Stephane Nicoll
* @deprecated as of 1.4 in favor of the artemis support
*/
*/
@Deprecated
class
SpringBootHornetQXAConnectionFactory
extends
HornetQXAConnectionFactory
{
class
SpringBootHornetQXAConnectionFactory
extends
HornetQXAConnectionFactory
{
private
final
HornetQProperties
properties
;
private
final
HornetQProperties
properties
;
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQAutoConfigurationTests.java
View file @
6bd7a2fe
...
@@ -65,6 +65,8 @@ import static org.mockito.Mockito.spy;
...
@@ -65,6 +65,8 @@ import static org.mockito.Mockito.spy;
*
*
* @author Stephane Nicoll
* @author Stephane Nicoll
*/
*/
@Deprecated
@SuppressWarnings
(
"deprecation"
)
public
class
HornetQAutoConfigurationTests
{
public
class
HornetQAutoConfigurationTests
{
@Rule
@Rule
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQEmbeddedConfigurationFactoryTests.java
View file @
6bd7a2fe
...
@@ -28,6 +28,8 @@ import static org.assertj.core.api.Assertions.assertThat;
...
@@ -28,6 +28,8 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Stephane Nicoll
* @author Stephane Nicoll
* @author Phillip Webb
* @author Phillip Webb
*/
*/
@Deprecated
@SuppressWarnings
(
"deprecation"
)
public
class
HornetQEmbeddedConfigurationFactoryTests
{
public
class
HornetQEmbeddedConfigurationFactoryTests
{
@Test
@Test
...
...
spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
View file @
6bd7a2fe
...
@@ -3963,15 +3963,53 @@ resolved against their provided names.
...
@@ -3963,15 +3963,53 @@ resolved against their provided names.
[[boot-features-artemis]]
[[boot-features-artemis]]
==== Artemis support
==== Artemis support
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. Make
the features listed in the <<boot-features-hornetq>> section below can be applied to
sure to use that rather than the deprecated HornetQ support.
Artemis. Simply replace `+++spring.hornetq.*+++` properties with `+++spring.artemis.*+++`
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.
Spring Boot can auto-configure a `ConnectionFactory` when it detects that Artemis is
available on the classpath. If the broker is present, an embedded broker is started and
configured automatically (unless the mode property has been explicitly set). The supported
modes are: `embedded` (to make explicit that an embedded broker is required and should
lead to an error if the broker is not available in the classpath), and `native` to connect
to a broker using the `netty` transport protocol. When the latter is configured, Spring
Boot configures a `ConnectionFactory` connecting to a broker running on the local machine
with the default settings.
NOTE: If you are using `spring-boot-starter-artemis` the necessary dependencies to
connect to an existing Artemis instance are provided, as well as the Spring infrastructure
to integrate with JMS. Adding `org.apache.activemq:artemis-jms-server` to your application
allows you to use the embedded mode.
Artemis configuration is controlled by external configuration properties in
`+spring.artemis.*+`. For example, you might declare the following section in
`application.properties`:
[source,properties,indent=0]
----
spring.artemis.mode=native
spring.artemis.host=192.168.1.210
spring.artemis.port=9876
spring.artemis.user=admin
spring.artemis.password=secret
----
When embedding the broker, you can choose if you want to enable persistence, and the list
of destinations that should be made available. These can be specified as a comma-separated
list to create them with the default options; or you can define bean(s) of type
`org.apache.activemq.artemis.jms.server.config.JMSQueueConfiguration` or
`org.apache.activemq.artemis.jms.server.config.TopicConfiguration`, for advanced queue and
topic configurations respectively.
See
{sc-spring-boot-autoconfigure}/jms/artemis/ArtemisProperties.{sc-ext}[`ArtemisProperties`]
for more of the supported options.
No JNDI lookup is involved at all and destinations are resolved against their names,
either using the '`name`' attribute in the Artemis configuration or the names provided
through configuration.
[[boot-features-hornetq]]
[[boot-features-hornetq]]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment