Claus Ibsen created CAMEL-27824:
-----------------------------------
Summary: camel-stringtemplate: the endpoint from the resource URI
header is stopped after every exchange
Key: CAMEL-27824
URL: https://issues.apache.org/jira/browse/CAMEL-27824
Project: Camel
Issue Type: Bug
Components: camel-stringtemplate
Reporter: Claus Ibsen
Fix For: 4.25.0
Found while improving the option descriptions of camel-stringtemplate for
CAMEL-23832 (pull request https://github.com/apache/camel/pull/31140).
This is a separate problem of the component; the descriptions change only
documents the current behavior.
h4. The shared endpoint is closed after use
With allowTemplateFromHeader=true and a CamelStringTemplateResourceUri header,
{{StringTemplateEndpoint.onExchange}} uses try-with-resources on the endpoint
from findOrCreateEndpoint, which is shared in the endpoint registry; close()
stops it after every exchange (it shows as Stopped, also for a route that uses
the same URI).
Proposed change: call newEndpoint.onExchange(exchange) without closing it, as
velocity and freemarker do.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)