[
https://issues.apache.org/jira/browse/CAMEL-27824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-27824:
--------------------------------
Description:
Found while improving the option descriptions of camel-stringtemplate for
CAMEL-23832 (commit
https://github.com/apache/camel/commit/f9114180c5e7be882210730be747beb6cfc38cb8,
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_
was:
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_
> 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
> Priority: Minor
> Fix For: 4.25.0
>
>
> Found while improving the option descriptions of camel-stringtemplate for
> CAMEL-23832 (commit
> https://github.com/apache/camel/commit/f9114180c5e7be882210730be747beb6cfc38cb8,
> 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)