davsclaus commented on PR #20113:
URL: https://github.com/apache/camel/pull/20113#issuecomment-3601147473

   Camel services has lifecycle managed by camel itself via its start/stop et 
all
   https://camel.apache.org/manual/lifecycle.html#_service_lifecycle
   
   The AutoClose was not in the JDK when Camel was created. Also its a bit 
mistake that Zoran added this for Camel 3.0 as it causes these sonartype 
reports to complain and its not intended to be used in try with resource 
scenarious. What Zoran was aiming for was to make it for `ProducerTemplate` 
that can be used by end users where you may want to use it short lived in a 
special use-case and then need to stop the template after use, and the 
AutoClose with try { } would ensure that. However it was added general to 
`Service` and as such are all over the place now.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to