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 faab741400c2a8f106c2a019d6c1518c14fb9062 Author: opencode <[email protected]> AuthorDate: Thu Oct 8 16:21:04 2026 +0200 Use a consistent key when adding and removing serviced entries during legacy application migration. migrateLegacyApps() guarded migration with tryAddServiced(cn.getBaseName()) but both removal paths (the submit failure catch block and the MigrateApp runnable) call removeServiced(cn.getName()). Because ContextName.getBaseName() (e.g. "app") and ContextName.getName() (e.g. "/app") are different strings, the base-name entry was never removed from the serviced set. This left a stale entry per migrated legacy application and, more importantly, caused every subsequent periodic check to skip re-migration of that application (e.g. after the admin replaces an updated WAR in legacyAppBase, or after a transient migration failure) until Tomcat was restarted. Key the add with cn.getName() so it matches the removals and the convention used by every other serviced-set caller (deploy, undeploy, Manager, etc.). --- java/org/apache/catalina/startup/HostConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/catalina/startup/HostConfig.java b/java/org/apache/catalina/startup/HostConfig.java index 5e1dd88657..0e367fecc0 100644 --- a/java/org/apache/catalina/startup/HostConfig.java +++ b/java/org/apache/catalina/startup/HostConfig.java @@ -1164,7 +1164,7 @@ public class HostConfig implements LifecycleListener { continue; } - if (tryAddServiced(cn.getBaseName())) { + if (tryAddServiced(cn.getName())) { try { // MigrateApp will call removeServiced results.add(es.submit(new MigrateApp(this, cn, source, destination))); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
