Commit Graph

613 Commits

Author SHA1 Message Date
Juergen Hoeller 1333669e2c Introduce SimpleDestinationResolver as new default for common setups
Closes gh-35456
2025-10-02 18:28:59 +02:00
Sébastien Deleuze 7635ac38f6 Use uppercase for classpath-related static final field names
Closes gh-35525
2025-09-22 18:32:14 +02:00
Sam Brannen 0c61ac956b Add missing @⁠Override annotations
... and suppress "serial" warnings
2025-09-22 13:20:37 +02:00
Sébastien Deleuze 79738d921a Upgrade to Jackson 3.0.0-rc10
See gh-35521
2025-09-22 11:16:25 +02:00
Sébastien Deleuze dc26aaa0ec Use JsonMapper instead of ObjectMapper when relevant
This commit updates Jackson 3 JSON support to use JsonMapper
instead of ObjectMapper in converters, codecs and view constructors.

As a consequence, AbstractJacksonDecoder, AbstractJacksonEncoder,
AbstractJacksonHttpMessageConverter and JacksonCodecSupport are
now parameterized with <T extends ObjectMapper>.

Closes gh-35282
2025-08-22 18:39:23 +02:00
Sébastien Deleuze 0389e3e3af Revert "Use JsonMapper instead of ObjectMapper when relevant"
This reverts commit d115f36400.

See gh-35282
2025-08-12 15:21:20 +02:00
Sébastien Deleuze d115f36400 Use JsonMapper instead of ObjectMapper when relevant
This commit updates Jackson 3 support to use JsonMapper instead
of ObjectMapper in converter, codec and view constructors.

Closes gh-35282
2025-08-12 10:36:37 +02:00
Brian Clozel ec87d90c9b Post process outgoing messages in JMS clients
Prior to this commit, the `JmsTemplate` would use `MessagePostProcessor`
for mutating JMS messages before they are being sent, but only if the
method takes a post processor as an argument.
The main use case so far is to mutate messages after they've been
created by a `MessageConverter` from a payload.

This commit updates the `JmsClient` to use `MessagePostProcessor` more
broadly, for all outgoing messages (converted or not). This brings an
interception-like mechanism for clients to enrich the message before
being sent.

This change also updates the `JmsClient` static factories and
introduces a Builder, allowing for more configuration options: multiple
message converters and message post processors.

Closes gh-35271
2025-08-01 15:40:32 +02:00
Juergen Hoeller 2b56b759af Fix JmsClient visibility
See gh-32501
2025-07-07 16:06:28 +02:00
Juergen Hoeller 56f16a8817 Add usage examples to JmsClient javadoc
See gh-32501
2025-07-07 14:08:33 +02:00
NeatGuyCoding d957f8bb5d
Fix copy-n-paste errors in JmsClient Javadoc
Closes gh-35163

Signed-off-by: NeatGuyCoding <15627489+NeatGuyCoding@users.noreply.github.com>
2025-07-07 12:41:35 +02:00
Juergen Hoeller 0111329214 Consistently introspect constructor-provided JmsTemplate
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
See gh-32501
2025-07-04 21:50:20 +02:00
Juergen Hoeller 8cb901825b Merge branch '6.2.x'
# Conflicts:
#	spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java
#	spring-jms/src/main/java/org/springframework/jms/core/JmsTemplate.java
#	spring-messaging/src/main/java/org/springframework/messaging/core/AbstractDestinationResolvingMessagingTemplate.java
#	spring-messaging/src/main/java/org/springframework/messaging/core/AbstractMessageReceivingTemplate.java
#	spring-messaging/src/main/java/org/springframework/messaging/core/AbstractMessagingTemplate.java
#	spring-messaging/src/main/java/org/springframework/messaging/core/MessageRequestReplyOperations.java
#	spring-messaging/src/main/java/org/springframework/messaging/core/MessageSendingOperations.java
2025-07-04 18:31:13 +02:00
Juergen Hoeller 65e5c14245 Polishing
Backport Bot / build (push) Waiting to run Details
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:23], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
2025-07-04 18:20:27 +02:00
Juergen Hoeller 9596b70b2a Consistent nullability and exception declarations
Closes gh-35159
2025-07-04 18:20:19 +02:00
Juergen Hoeller 6dc3c11828 Introduce JmsClient with configurable settings per operation
Closes gh-32501
Closes gh-26840
2025-07-04 17:36:33 +02:00
Sam Brannen cf06efece6 Merge branch '6.2.x'
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
2025-07-04 11:49:10 +02:00
Sam Brannen 5da8d5e795 Remove unnecessary `final` declarations in JmsTemplate
Backport Bot / build (push) Waiting to run Details
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:23], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
This commit removes unnecessary `final` declarations for parameters that
are "effectively final".
2025-07-04 11:38:30 +02:00
Sam Brannen 133f330850 Declare remaining messageSelector parameters in JmsOperations as @⁠Nullable
Closes gh-35151
2025-07-04 11:35:49 +02:00
Jiandong Ma b6675edb92 Declare messageSelector parameters in JmsOperations as @⁠Nullable
See gh-35151

Signed-off-by: Jiandong Ma <jiandong.ma.cn@gmail.com>
2025-07-03 19:17:49 +02:00
Juergen Hoeller 196b7ec275 Deprecate (Jdbc)DaoSupport classes (including JmsGatewaySupport)
Closes gh-35145
2025-07-02 11:12:57 +02:00
Spring Builds 16edf9867a Update copyright headers in source files
This commit updates Java, Kotlin, and Groovy source files to use the
"<year>-present" pattern in copyright headers.

Closes gh-35070
2025-06-17 16:23:50 +02:00
Spring Builds aee29b7f30 Update copyright headers in source files
This commit updates Java, Kotlin, and Groovy source files to use the
"<year>-present" pattern in copyright headers.

Closes gh-35070
2025-06-17 15:54:58 +02:00
Sam Brannen 8b9e620084 Allow FixedBackOff to be constructed with only a custom interval
This commit introduces two new constructors:

- FixedBackOff(long)

- FixedBackOff(Duration)

Closes gh-35028
2025-06-11 13:26:16 +02:00
Sam Brannen 077146d636 Merge branch '6.2.x'
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
2025-06-09 14:12:45 +02:00
Sam Brannen 18d6a55e3e Polishing and removal of "this." for method invocations
Backport Bot / build (push) Waiting to run Details
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:23], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
2025-06-09 14:10:30 +02:00
Sam Brannen 01fea5e7ed Polish Jackson 3 support
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
- Improve Javadoc.

- Suppress warnings for "removal".

- Update copyright headers.

- Migrate several tests from:
  - MappingJackson2MessageConverter to JacksonJsonMessageConverter
  - Jackson2JsonEncoder to JacksonJsonEncoder
  - Jackson2JsonDecoder to JacksonJsonDecoder
  - Jackson2SmileEncoder to JacksonSmileEncoder
  - Jackson2ObjectMapperBuilder to JsonMapper and XmlMapper
  - MappingJackson2JsonView to JacksonJsonView
  - MappingJackson2HttpMessageConverter to JacksonJsonHttpMessageConverter
  - MappingJackson2XmlHttpMessageConverter to JacksonXmlHttpMessageConverter
2025-05-14 16:55:27 +02:00
Sébastien Deleuze 2a29e16456 Deprecate for removal Jackson 2 support
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
This commit deprecate for removal (likely in a future 7.x release) the
Jackson 2 support in favor of the Jackson 3 one.

Closes gh-33798
2025-05-13 18:02:33 +02:00
Sébastien Deleuze a0ed3f052e Introduce Jackson 3 support for spring-jms
This commit introduces a JacksonJsonMessageConverter Jackson 3 variant
of MappingJackson2MessageConverter.

See gh-33798
2025-05-13 17:53:28 +02:00
Sam Brannen 9956cc11bb Merge branch '6.2.x' 2025-03-29 12:57:49 +01:00
Sam Brannen 9fd1d0c6a3 Polish Javadoc
Backport Bot / build (push) Has been cancelled Details
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Has been cancelled Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:ubuntu-latest name:Linux]) (push) Has been cancelled Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:ubuntu-latest name:Linux]) (push) Has been cancelled Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:23], map[id:ubuntu-latest name:Linux]) (push) Has been cancelled Details
Deploy Docs / Dispatch docs deployment (push) Has been cancelled Details
Build and Deploy Snapshot / Verify (push) Has been cancelled Details
This commit also reverts the change to ASM's SymbolTable class.

See gh-34679
2025-03-29 12:57:08 +01:00
Tran Ngoc Nhan 30fcaef813 Remove unnecessary closing curly brackets in Javadoc
Closes gh-34679

Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2025-03-29 12:37:48 +01:00
Juergen Hoeller 3872c1a762 Merge branch '6.2.x'
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
# Conflicts:
#	spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java
#	spring-jms/src/main/java/org/springframework/jms/config/AbstractJmsListenerContainerFactory.java
#	spring-jms/src/main/java/org/springframework/jms/listener/AbstractMessageListenerContainer.java
2025-03-25 17:13:02 +01:00
Juergen Hoeller 20736bd06f Introduce acknowledgeAfterListener flag for custom acknowledge handling
Closes gh-34635
2025-03-25 17:06:28 +01:00
Sam Brannen 8db1340263 Merge branch '6.2.x' 2025-03-19 16:24:18 +01:00
Sam Brannen 208d52d852 Introduce Checkstyle rule for separator symbol location 2025-03-19 15:35:44 +01:00
Sébastien Deleuze a73a819c82 Refine `@SuppressWarnings("NullAway")`
See gh-28797
2025-01-08 17:34:24 +01:00
Sébastien Deleuze 9516d9b822 Refine null-safety in the spring-jms module
Closes gh-34157
2024-12-26 15:18:27 +01:00
Sébastien Deleuze bc5d771a06 Switch to JSpecify annotations
This commit updates the whole Spring Framework codebase to use JSpecify
annotations instead of Spring null-safety annotations with JSR 305
semantics.

JSpecify provides signficant enhancements such as properly defined
specifications, a canonical dependency with no split-package issue,
better tooling, better Kotlin integration and the capability to specify
generic type, array and varargs element null-safety. Generic type
null-safety is not defined by this commit yet and will be specified
later.

A key difference is that Spring null-safety annotations, following
JSR 305 semantics, apply to fields, parameters and return values,
while JSpecify annotations apply to type usages. That's why this
commit moves nullability annotations closer to the type for fields
and return values.

See gh-28797
2024-12-19 11:07:23 +01:00
Sam Brannen dd92eac3ad Refer to message "receipt" instead of "reception" 2024-11-19 13:18:12 +01:00
Brian Clozel ab2f1f8885 Merge branch '6.1.x' 2024-10-21 16:20:57 +02:00
Brian Clozel 84e762b470 Fix double accounting of JMS process observations
Prior to this commit, the instrumentation of the processing of JMS
messages would happen a different levels of the hierarchy, accounting
for alli known implementations, `SimpleMessageListenerContainer` and
`DefaultMessageListenerContainer` as well as various use cases and
`MessageListener` variants.

Unfortunately, this instrumentation could lead to observing JMS
processing twice in some cases, and would not be consistent about the
scope of what's observed.

This commit moves the instrumentation basics into the
`AbstractMessageListenerContainer` but leaves the actual observation
calls to the public implementations.

Fixes gh-33758
2024-10-21 16:09:58 +02:00
Juergen Hoeller e89218b39a Merge branch '6.1.x' 2024-10-16 13:46:22 +02:00
Juergen Hoeller 11d4272ff4 Use Locale.ROOT consistently for toLower/toUpperCase
Closes gh-33708
2024-10-16 13:36:23 +02:00
Brian Clozel 9be3d85a06 Merge branch '6.1.x' 2024-10-14 15:04:58 +02:00
Brian Clozel 32962894a0 Add runtime hints for JMS connection factories proxies
Prior to this commit, the JMS connection factories would proxy various
interfaces. This typically requires runtime hints for GraalVM native
applications and spring-jms is missing those.

This commit adds a new `ConnectionFactoriesRuntimeHints` that
contributes such hints with type conditions.

Fixes gh-33590
2024-10-14 14:54:24 +02:00
Yanming Zhou 8941e2876e Replace 'e.g.' with 'for example' in documentation and comments
Closes gh-33515
2024-09-26 14:11:17 +02:00
Sam Brannen d749d2949d Use new features from JUnit Jupiter 5.11
This commit primarily migrates to the new argumentSet() feature but also
applies additional polishing to our use of parameterized tests.

See gh-33395
2024-08-16 13:48:19 +02:00
Stéphane Nicoll 65faca8236 Consistently using credentials for creating the JMSContext
This commit updates UserCredentialsConnectionFactoryAdapter to apply
the same handling of credentials for creating the JMSContext.

Closes gh-33270
2024-07-25 09:41:43 +02:00
Brian Clozel b701b26b07 Merge branch '6.1.x' 2024-07-19 17:23:14 +02:00