|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2013 the original author or authors. |
| 2 | + * Copyright 2002-2014 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.
|
|
35 | 35 | import org.springframework.transaction.support.CallbackPreferringPlatformTransactionManager;
|
36 | 36 | import org.springframework.transaction.support.DefaultTransactionDefinition;
|
37 | 37 | import org.springframework.transaction.support.DefaultTransactionStatus;
|
| 38 | +import org.springframework.transaction.support.SmartTransactionObject; |
38 | 39 | import org.springframework.transaction.support.TransactionCallback;
|
39 | 40 | import org.springframework.transaction.support.TransactionSynchronization;
|
40 | 41 | import org.springframework.transaction.support.TransactionSynchronizationManager;
|
| 42 | +import org.springframework.transaction.support.TransactionSynchronizationUtils; |
41 | 43 | import org.springframework.util.ReflectionUtils;
|
42 | 44 |
|
43 | 45 | /**
|
@@ -308,7 +310,7 @@ else if (pb == TransactionDefinition.PROPAGATION_NOT_SUPPORTED) {
|
308 | 310 | /**
|
309 | 311 | * Adapter that executes the given Spring transaction within the WebSphere UOWAction shape.
|
310 | 312 | */
|
311 |
| - private class UOWActionAdapter<T> implements UOWAction { |
| 313 | + private class UOWActionAdapter<T> implements UOWAction, SmartTransactionObject { |
312 | 314 |
|
313 | 315 | private final TransactionDefinition definition;
|
314 | 316 |
|
@@ -373,6 +375,16 @@ public T getResult() {
|
373 | 375 | }
|
374 | 376 | return this.result;
|
375 | 377 | }
|
| 378 | + |
| 379 | + @Override |
| 380 | + public boolean isRollbackOnly() { |
| 381 | + return uowManager.getRollbackOnly(); |
| 382 | + } |
| 383 | + |
| 384 | + @Override |
| 385 | + public void flush() { |
| 386 | + TransactionSynchronizationUtils.triggerFlush(); |
| 387 | + } |
376 | 388 | }
|
377 | 389 |
|
378 | 390 | }
|
0 commit comments