Merge branch '5.3.x'

# Conflicts:
#	build.gradle
#	spring-jms/src/main/java/org/springframework/jms/listener/AbstractPollingMessageListenerContainer.java
This commit is contained in:
Juergen Hoeller 2022-01-19 13:56:37 +01:00
commit 66732afc10
3 changed files with 22 additions and 8 deletions

View File

@ -28,9 +28,9 @@ configure(allprojects) { project ->
dependencyManagement { dependencyManagement {
imports { imports {
mavenBom "com.fasterxml.jackson:jackson-bom:2.13.1" mavenBom "com.fasterxml.jackson:jackson-bom:2.13.1"
mavenBom "io.netty:netty-bom:4.1.72.Final" mavenBom "io.netty:netty-bom:4.1.73.Final"
mavenBom "io.projectreactor:reactor-bom:2020.0.15" mavenBom "io.projectreactor:reactor-bom:2020.0.15"
mavenBom "io.r2dbc:r2dbc-bom:Arabba-SR11" mavenBom "io.r2dbc:r2dbc-bom:Arabba-SR12"
mavenBom "io.rsocket:rsocket-bom:1.1.1" mavenBom "io.rsocket:rsocket-bom:1.1.1"
mavenBom "org.eclipse.jetty:jetty-bom:11.0.7" mavenBom "org.eclipse.jetty:jetty-bom:11.0.7"
mavenBom "org.jetbrains.kotlin:kotlin-bom:1.6.10" mavenBom "org.jetbrains.kotlin:kotlin-bom:1.6.10"
@ -45,7 +45,7 @@ configure(allprojects) { project ->
entry 'log4j-jul' entry 'log4j-jul'
entry 'log4j-slf4j-impl' entry 'log4j-slf4j-impl'
} }
dependency "org.slf4j:slf4j-api:1.7.32" dependency "org.slf4j:slf4j-api:1.7.33"
dependency("com.google.code.findbugs:findbugs:3.0.1") { dependency("com.google.code.findbugs:findbugs:3.0.1") {
exclude group: "dom4j", name: "dom4j" exclude group: "dom4j", name: "dom4j"
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2020 the original author or authors. * Copyright 2002-2022 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.
@ -32,6 +32,7 @@ import org.springframework.util.StringValueResolver;
/** /**
* Simple implementation of the {@link AliasRegistry} interface. * Simple implementation of the {@link AliasRegistry} interface.
*
* <p>Serves as base class for * <p>Serves as base class for
* {@link org.springframework.beans.factory.support.BeanDefinitionRegistry} * {@link org.springframework.beans.factory.support.BeanDefinitionRegistry}
* implementations. * implementations.
@ -101,8 +102,8 @@ public class SimpleAliasRegistry implements AliasRegistry {
*/ */
public boolean hasAlias(String name, String alias) { public boolean hasAlias(String name, String alias) {
String registeredName = this.aliasMap.get(alias); String registeredName = this.aliasMap.get(alias);
return ObjectUtils.nullSafeEquals(registeredName, name) || (registeredName != null return ObjectUtils.nullSafeEquals(registeredName, name) ||
&& hasAlias(name, registeredName)); (registeredName != null && hasAlias(name, registeredName));
} }
@Override @Override

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2021 the original author or authors. * Copyright 2002-2022 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.
@ -29,6 +29,7 @@ import org.springframework.jms.connection.SingleConnectionFactory;
import org.springframework.jms.support.JmsUtils; import org.springframework.jms.support.JmsUtils;
import org.springframework.lang.Nullable; import org.springframework.lang.Nullable;
import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.TransactionException;
import org.springframework.transaction.TransactionStatus; import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.support.DefaultTransactionDefinition; import org.springframework.transaction.support.DefaultTransactionDefinition;
import org.springframework.transaction.support.ResourceTransactionManager; import org.springframework.transaction.support.ResourceTransactionManager;
@ -248,7 +249,19 @@ public abstract class AbstractPollingMessageListenerContainer extends AbstractMe
rollbackOnException(this.transactionManager, status, ex); rollbackOnException(this.transactionManager, status, ex);
throw ex; throw ex;
} }
this.transactionManager.commit(status); try {
this.transactionManager.commit(status);
}
catch (TransactionException ex) {
// Propagate transaction system exceptions as infrastructure problems.
throw ex;
}
catch (RuntimeException ex) {
// Typically a late persistence exception from a listener-used resource
// -> handle it as listener exception, not as an infrastructure problem.
// E.g. a database locking failure should not lead to listener shutdown.
handleListenerException(ex);
}
return messageReceived; return messageReceived;
} }