Skip to content

WebSphereUowTransactionManager swallows original exception when commit fails for another reason [SPR-16102] #20650

Closed
@spring-projects-issues

Description

@spring-projects-issues

Alexander Pinske opened SPR-16102 and commented

  • WebSphereUowTransactionManager stores an exception during the execution of a transactional method in UOWActionAdapter.exception
  • it would be rethrown during action.getResult()
  • but not if there is another exception during commit
  • in that case only the latter exception is thrown and the "inner" exception silently ignored

It would be nice if the previous exception could be logged, when it is shadowed by a subsequent commit failure.

Reasoning: We are currently analysing a problem, where a JMS-Publish takes a long time and aborts after some timeout. This is the inner exception. During this time the global transaction is rolled back, which leads to an exception during commit. The behaviour is okay, but we have "lost" the actual cause of the problem.

Of course there are workaround, e.g. using a LoggingInterceptor around the transaction method, but that would log any exception (that will usually still be there after commit/rollback) not only the "shadowed" ones.


Affects: 4.3.11

Referenced from: commits 75a813a, efe943d

Backported to: 4.3.13

Metadata

Metadata

Assignees

Labels

in: dataIssues in data modules (jdbc, orm, oxm, tx)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions