This is an automated email from the ASF dual-hosted git repository. rmaucher pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 8090ea9cb642fb0491cd5894e1a2df56450be0a2 Author: opencode <[email protected]> AuthorDate: Wed Sep 30 23:10:04 2026 +0200 Fire the SEND_MESSAGE_FAILURE_EVENT lifecycle event with the failing message, destination and exception from SimpleTcpCluster.send() when notifyLifecycleListenerOnFailure is enabled, making the previously declared but never fired event work as documented --- java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java | 4 ++++ webapps/docs/changelog.xml | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java b/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java index d4d7d6c614..8f67f06382 100644 --- a/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java +++ b/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java @@ -771,6 +771,10 @@ public class SimpleTcpCluster extends LifecycleMBeanBase } } catch (Exception e) { log.error(sm.getString("simpleTcpCluster.sendFailed"), e); + if (notifyLifecycleListenerOnFailure) { + // Notify our interested LifecycleListeners + fireLifecycleEvent(SEND_MESSAGE_FAILURE_EVENT, new SendMessageData(msg, dest, e)); + } } } diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index e7d453683a..6761167eca 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -401,6 +401,13 @@ <subsection name="Cluster"> <changelog> <!-- Entries for backport and removal before 12.0.0-M1 below this line --> + <fix> + Fire the documented <code>send_message_failure</code> lifecycle event + with the message, destination and exception when a + <code>SimpleTcpCluster</code> message send fails and + <code>notifyLifecycleListenerOnFailure</code> is enabled. The event + was previously declared but never fired. (remm) + </fix> <fix> Fix a possible deadlock in <code>DeltaSession.expire()</code>: the final session delta is now captured and sent to the cluster before the --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
