Skip to content

Commit 8d735e6

Browse files
committed
Note on PersistenceExceptionTranslator sorting and non-singleton retrieval
Closes gh-26412
1 parent 9bc0963 commit 8d735e6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

spring-tx/src/main/java/org/springframework/dao/annotation/PersistenceExceptionTranslationPostProcessor.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -38,7 +38,6 @@
3838
* PersistenceExceptionTranslator} interface, which are subsequently asked to translate
3939
* candidate exceptions.
4040
*
41-
4241
* <p>All of Spring's applicable resource factories (e.g.
4342
* {@link org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean})
4443
* implement the {@code PersistenceExceptionTranslator} interface out of the box.
@@ -47,6 +46,11 @@
4746
* with the {@code @Repository} annotation, along with defining this post-processor
4847
* as a bean in the application context.
4948
*
49+
* <p>As of 5.3, {@code PersistenceExceptionTranslator} beans will be sorted according
50+
* to Spring's dependency ordering rules: see {@link org.springframework.core.Ordered}
51+
* and {@link org.springframework.core.annotation.Order}. Note that such beans will
52+
* get retrieved from any scope, not just singleton scope, as of this 5.3 revision.
53+
*
5054
* @author Rod Johnson
5155
* @author Juergen Hoeller
5256
* @since 2.0

0 commit comments

Comments
 (0)