cshannon commented on PR #1657: URL: https://github.com/apache/activemq/pull/1657#issuecomment-3878761324
> The standard/default use case for PooledConnectionFactory is to _not_ use a try-with-resources. Feels like adding this is for the _test_ use case vs the primary coded use case. Thinking about it more that makes sense as it's a pooled factory so users really wouldn't ever be closing it immediately with try-with-resources. I can't really think of a use case where you'd use a pooled factory and immediately close it with try-with-resources as if you were going to do that you'd just use a normal connection. For the analysis part I was mostly thinking of it from an IDE issue (which isn't that big of a deal but a little annoying) but the static analysis issue of builds breaking with things like spot bugs is certainly a problem and would produce annoying false negatives. I guess based on that we should leave it off and go back to try/finally. I'm not really in favor of a subclass unless there is a real use case, or another option is we just add a subclass only in the testing package for unit tests because it doesn't seem beneficial to add autocloseable if there is no use case for a real application. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information, visit: https://activemq.apache.org/contact
