|
1 | 1 | /* |
2 | | - * Copyright 2016-2020 the original author or authors. |
| 2 | + * Copyright 2016-2021 the original author or authors. |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
|
31 | 31 | import org.springframework.dao.TransientDataAccessException; |
32 | 32 | import org.springframework.integration.support.locks.ExpirableLockRegistry; |
33 | 33 | import org.springframework.integration.util.UUIDConverter; |
| 34 | +import org.springframework.transaction.TransactionSystemException; |
34 | 35 | import org.springframework.transaction.TransactionTimedOutException; |
35 | 36 | import org.springframework.util.Assert; |
36 | 37 |
|
|
50 | 51 | * @author Gary Russell |
51 | 52 | * @author Alexandre Strubel |
52 | 53 | * @author Olivier Hubaut |
| 54 | + * @author Fran Aranda |
53 | 55 | * |
54 | 56 | * @since 4.3 |
55 | 57 | */ |
@@ -134,7 +136,7 @@ public void lock() { |
134 | 136 | } |
135 | 137 | break; |
136 | 138 | } |
137 | | - catch (TransientDataAccessException | TransactionTimedOutException e) { |
| 139 | + catch (TransientDataAccessException | TransactionTimedOutException | TransactionSystemException e) { |
138 | 140 | // try again |
139 | 141 | } |
140 | 142 | catch (InterruptedException e) { |
@@ -168,7 +170,7 @@ public void lockInterruptibly() throws InterruptedException { |
168 | 170 | } |
169 | 171 | break; |
170 | 172 | } |
171 | | - catch (TransientDataAccessException | TransactionTimedOutException e) { |
| 173 | + catch (TransientDataAccessException | TransactionTimedOutException | TransactionSystemException e) { |
172 | 174 | // try again |
173 | 175 | } |
174 | 176 | catch (InterruptedException ie) { |
@@ -212,7 +214,7 @@ public boolean tryLock(long time, TimeUnit unit) throws InterruptedException { |
212 | 214 | } |
213 | 215 | return acquired; |
214 | 216 | } |
215 | | - catch (TransientDataAccessException | TransactionTimedOutException e) { |
| 217 | + catch (TransientDataAccessException | TransactionTimedOutException | TransactionSystemException e) { |
216 | 218 | // try again |
217 | 219 | } |
218 | 220 | catch (Exception e) { |
@@ -245,7 +247,7 @@ public void unlock() { |
245 | 247 | this.mutex.delete(this.path); |
246 | 248 | return; |
247 | 249 | } |
248 | | - catch (TransientDataAccessException | TransactionTimedOutException e) { |
| 250 | + catch (TransientDataAccessException | TransactionTimedOutException | TransactionSystemException e) { |
249 | 251 | // try again |
250 | 252 | } |
251 | 253 | catch (Exception e) { |
|
0 commit comments