1
1
/*
2
- * Copyright 2002-2017 the original author or authors.
2
+ * Copyright 2002-2020 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.
@@ -282,14 +282,14 @@ else if (pb == TransactionDefinition.PROPAGATION_NOT_SUPPORTED) {
282
282
SuspendedResourcesHolder suspendedResources = (!joinTx ? suspend (null ) : null );
283
283
UOWActionAdapter <T > action = null ;
284
284
try {
285
- if (definition .getTimeout () > TransactionDefinition .TIMEOUT_DEFAULT ) {
285
+ boolean actualTransaction = (uowType == UOWManager .UOW_TYPE_GLOBAL_TRANSACTION );
286
+ if (actualTransaction && definition .getTimeout () > TransactionDefinition .TIMEOUT_DEFAULT ) {
286
287
this .uowManager .setUOWTimeout (uowType , definition .getTimeout ());
287
288
}
288
289
if (debug ) {
289
290
logger .debug ("Invoking WebSphere UOW action: type=" + uowType + ", join=" + joinTx );
290
291
}
291
- action = new UOWActionAdapter <T >(
292
- definition , callback , (uowType == UOWManager .UOW_TYPE_GLOBAL_TRANSACTION ), !joinTx , newSynch , debug );
292
+ action = new UOWActionAdapter <T >(definition , callback , actualTransaction , !joinTx , newSynch , debug );
293
293
this .uowManager .runUnderUOW (uowType , joinTx , action );
294
294
if (debug ) {
295
295
logger .debug ("Returned from WebSphere UOW action: type=" + uowType + ", join=" + joinTx );
@@ -308,7 +308,7 @@ else if (pb == TransactionDefinition.PROPAGATION_NOT_SUPPORTED) {
308
308
}
309
309
catch (UOWActionException ex ) {
310
310
TransactionSystemException tse =
311
- new TransactionSystemException ("UOWManager threw unexpected UOWActionException " , ex );
311
+ new TransactionSystemException ("UOWManager transaction processing failed " , ex );
312
312
Throwable appEx = action .getException ();
313
313
if (appEx != null ) {
314
314
logger .error ("Application exception overridden by rollback exception" , appEx );
0 commit comments