|
26 | 26 | import java.util.concurrent.locks.ReentrantLock;
|
27 | 27 |
|
28 | 28 | import org.springframework.dao.CannotAcquireLockException;
|
29 |
| -import org.springframework.dao.CannotSerializeTransactionException; |
30 | 29 | import org.springframework.dao.DataAccessResourceFailureException;
|
31 |
| -import org.springframework.dao.QueryTimeoutException; |
| 30 | +import org.springframework.dao.TransientDataAccessException; |
32 | 31 | import org.springframework.integration.support.locks.DefaultLockRegistry;
|
33 | 32 | import org.springframework.integration.support.locks.ExpirableLockRegistry;
|
34 | 33 | import org.springframework.integration.support.locks.LockRegistry;
|
35 | 34 | import org.springframework.integration.util.UUIDConverter;
|
36 |
| -import org.springframework.transaction.TransactionTimedOutException; |
37 | 35 | import org.springframework.util.Assert;
|
38 | 36 |
|
39 | 37 | /**
|
|
47 | 45 | * @author Artem Bilan
|
48 | 46 | * @author Vedran Pavic
|
49 | 47 | * @author Kai Zimmermann
|
| 48 | + * @author Bartosz Rempuszewski |
50 | 49 | *
|
51 | 50 | * @since 4.3
|
52 | 51 | */
|
@@ -113,7 +112,7 @@ public void lock() {
|
113 | 112 | }
|
114 | 113 | break;
|
115 | 114 | }
|
116 |
| - catch (CannotSerializeTransactionException | TransactionTimedOutException | QueryTimeoutException e) { |
| 115 | + catch (TransientDataAccessException e) { |
117 | 116 | // try again
|
118 | 117 | }
|
119 | 118 | catch (InterruptedException e) {
|
@@ -147,7 +146,7 @@ public void lockInterruptibly() throws InterruptedException {
|
147 | 146 | }
|
148 | 147 | break;
|
149 | 148 | }
|
150 |
| - catch (CannotSerializeTransactionException | TransactionTimedOutException | QueryTimeoutException e) { |
| 149 | + catch (TransientDataAccessException e) { |
151 | 150 | // try again
|
152 | 151 | }
|
153 | 152 | catch (InterruptedException ie) {
|
@@ -191,7 +190,7 @@ public boolean tryLock(long time, TimeUnit unit) throws InterruptedException {
|
191 | 190 | }
|
192 | 191 | return acquired;
|
193 | 192 | }
|
194 |
| - catch (CannotSerializeTransactionException | TransactionTimedOutException | QueryTimeoutException e) { |
| 193 | + catch (TransientDataAccessException e) { |
195 | 194 | // try again
|
196 | 195 | }
|
197 | 196 | catch (Exception e) {
|
|
0 commit comments