From 54ee9207a4729f3d98cd4e26d8e4f14336a50c3e Mon Sep 17 00:00:00 2001 From: aubelm Date: Wed, 26 Jun 2024 13:09:43 +0200 Subject: [PATCH] https://github.com/atomikos/transactions-essentials/issues/222 Avoid prepare call to the Coordinator for recursions and RequiresNew --- .../java/com/atomikos/icatch/imp/ActiveStateHandler.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/transactions/src/main/java/com/atomikos/icatch/imp/ActiveStateHandler.java b/public/transactions/src/main/java/com/atomikos/icatch/imp/ActiveStateHandler.java index 0afc18b4..328dfbbe 100644 --- a/public/transactions/src/main/java/com/atomikos/icatch/imp/ActiveStateHandler.java +++ b/public/transactions/src/main/java/com/atomikos/icatch/imp/ActiveStateHandler.java @@ -158,8 +158,13 @@ public void doRollback() count = participants.size (); result = new PrepareResult ( count ); Enumeration enumm = participants.elements (); + String rootId = getCoordinator().getRootId(); while ( enumm.hasMoreElements () ) { Participant p = (Participant) enumm.nextElement (); + + // Fix for recursive call to rootId + if (rootId != null && p.getURI() != null && p.getURI().endsWith(rootId)) + break; PrepareMessage pm = new PrepareMessage ( p, result ); if ( getCascadeList () != null && p.getURI () != null ) { //null for OTS Integer sibnum = (Integer) getCascadeList ().get ( p.getURI () );