This is an automated email from the ASF dual-hosted git repository.
andreapatricelli pushed a commit to branch 2_0_X
in repository https://gitbox.apache.org/repos/asf/syncope.git
The following commit(s) were added to refs/heads/2_0_X by this push:
new 9156491 improving transaction interceptor to preserve already marked
transact… (#198)
9156491 is described below
commit 9156491ccef764155d44ed85a9bc57eb95e0f509
Author: Andrea Patricelli <[email protected]>
AuthorDate: Tue Jun 16 15:00:23 2020 +0200
improving transaction interceptor to preserve already marked transact…
(#198)
* improving transaction interceptor to preserve already marked transactions
* restored type check in transaction interceptor
---
.../core/persistence/jpa/spring/DomainTransactionInterceptor.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/spring/DomainTransactionInterceptor.java
b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/spring/DomainTransactionInterceptor.java
index 691f5e4..7cb264c 100644
---
a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/spring/DomainTransactionInterceptor.java
+++
b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/spring/DomainTransactionInterceptor.java
@@ -50,7 +50,10 @@ public class DomainTransactionInterceptor extends
TransactionInterceptor {
TransactionAttribute txAttr =
origTxAttrSource.getTransactionAttribute(method, targetClass);
if (txAttr instanceof DefaultTransactionAttribute) {
- ((DefaultTransactionAttribute)
txAttr).setQualifier(AuthContextUtils.getDomain());
+ DefaultTransactionAttribute dta =
(DefaultTransactionAttribute) txAttr;
+ if (dta.getQualifier() == null) {
+ dta.setQualifier(AuthContextUtils.getDomain());
+ }
}
return txAttr;