cshannon commented on code in PR #2585:
URL: https://github.com/apache/activemq/pull/2585#discussion_r4077734521


##########
activemq-broker/src/main/java/org/apache/activemq/transaction/Transaction.java:
##########
@@ -134,24 +134,59 @@ protected void fireBeforeCommit() throws Exception {
     }
 
     protected void fireAfterCommit() throws Exception {
+        // The transaction outcome is already durable when afterCommit runs, 
so a
+        // failing synchronization must not prevent the remaining ones from
+        // executing (e.g. the destination synchronization that maintains the
+        // destination statistics) - run them all and rethrow the first 
failure.
+        Throwable firstException = null;
         synchronized(synchronizations) {
             for (Iterator<Synchronization> iter = synchronizations.iterator(); 
iter.hasNext();) {
                 Synchronization s = iter.next();
-                s.afterCommit();
+                try {
+                    s.afterCommit();
+                } catch (Throwable t) {

Review Comment:
   > That's the tricky part -- The broker is not guaranteed to go down on 
IOException -- it may recover. The IOException will got to the 
IOExceptionHandler and may resume based on configuration.
   > 
   > JDBC for example, can retry and reconnect and the broker go back to being 
active.
   
   Did you mean to post this on #2590 ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to