Merge branch '5.3.x'
# Conflicts: # build.gradle # spring-jms/src/main/java/org/springframework/jms/listener/AbstractPollingMessageListenerContainer.java
This commit is contained in:
commit
66732afc10
|
@ -28,9 +28,9 @@ configure(allprojects) { project ->
|
|||
dependencyManagement {
|
||||
imports {
|
||||
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.r2dbc:r2dbc-bom:Arabba-SR11"
|
||||
mavenBom "io.r2dbc:r2dbc-bom:Arabba-SR12"
|
||||
mavenBom "io.rsocket:rsocket-bom:1.1.1"
|
||||
mavenBom "org.eclipse.jetty:jetty-bom:11.0.7"
|
||||
mavenBom "org.jetbrains.kotlin:kotlin-bom:1.6.10"
|
||||
|
@ -45,7 +45,7 @@ configure(allprojects) { project ->
|
|||
entry 'log4j-jul'
|
||||
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") {
|
||||
exclude group: "dom4j", name: "dom4j"
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
* 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.
|
||||
*
|
||||
* <p>Serves as base class for
|
||||
* {@link org.springframework.beans.factory.support.BeanDefinitionRegistry}
|
||||
* implementations.
|
||||
|
@ -101,8 +102,8 @@ public class SimpleAliasRegistry implements AliasRegistry {
|
|||
*/
|
||||
public boolean hasAlias(String name, String alias) {
|
||||
String registeredName = this.aliasMap.get(alias);
|
||||
return ObjectUtils.nullSafeEquals(registeredName, name) || (registeredName != null
|
||||
&& hasAlias(name, registeredName));
|
||||
return ObjectUtils.nullSafeEquals(registeredName, name) ||
|
||||
(registeredName != null && hasAlias(name, registeredName));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -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");
|
||||
* 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.lang.Nullable;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
import org.springframework.transaction.TransactionException;
|
||||
import org.springframework.transaction.TransactionStatus;
|
||||
import org.springframework.transaction.support.DefaultTransactionDefinition;
|
||||
import org.springframework.transaction.support.ResourceTransactionManager;
|
||||
|
@ -248,7 +249,19 @@ public abstract class AbstractPollingMessageListenerContainer extends AbstractMe
|
|||
rollbackOnException(this.transactionManager, status, 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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue