Claus Ibsen created CAMEL-25097:
-----------------------------------
Summary: camel-main - Route loading, route reload and startup
conditions: fix bugs found in a deep review
Key: CAMEL-25097
URL: https://issues.apache.org/jira/browse/CAMEL-25097
Project: Camel
Issue Type: Bug
Components: camel-main
Reporter: Claus Ibsen
A review of the route loading, route reload and startup conditions of
camel-main found these bugs:
# The route reload watcher thread stops for good (silently, and {{isRunning}}
still reports true) when reloading a file throws an {{Error}} (such as
{{ExceptionInInitializerError}} or {{NoClassDefFoundError}} when compiling a
Java route).
# {{routesReloadPattern}} only matches the name of the file, so a pattern with
a directory (such as {{sub/*.yaml}}) never matches. A space after a comma in
the pattern is also not trimmed.
# The startup condition timeout error names the last condition, not the
condition that cannot continue.
# Startup conditions are not checked at all with {{timeout=0}} (or {{timeout <=
interval}}), and a condition that becomes true during the last wait is never
checked again, so startup fails even though the condition is met.
# {{camel.startupCondition.*}} keys in camelCase (such as
{{camel.startupCondition.enabled}}) are silently ignored, as only the lower
case {{camel.startupcondition.}} prefix is matched.
# A space after a comma in {{camel.main.routesIncludePattern}} (such as
{{file:a.xml, file:b.xml}}) fails startup with {{Cannot find a ResourceResolver
in classpath supporting the scheme: file}}.
# {{camel.variable.global.foo.bar}} is stored as the variable {{foo:bar}} (the
first dot is replaced as for route and group variables).
# {{camel.routeTemplate.x=y}} (without the {{[id]}}) fails startup with
{{RouteTemplateParameterSource with routeId: null has no templateId defined}};
it now fails with a clear message.
Not changed:
* An unknown {{onTimeout}} value of the startup conditions is treated as ignore.
* A variable value that starts with {{http:}} or {{https:}} is loaded as a
resource.
* The duplicate route detector key and some misleading debug logs.
_Claude Code on behalf of Claus Ibsen_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)