brudo commented on pull request #3:
URL: 
https://github.com/apache/activemq-nms-openwire/pull/3#issuecomment-767996287


   [ThreadStatic] does ensure that each thread gets its own copy; but if it is 
accessed from a thread pool, it will be initialized and reused there too, which 
might create hard-to-find problems. I'll try to understand what it was 
originally meant to accomplish, and see if there's another way (even if 
slightly higher run-time cost).
   
   Actually, chasing down through the code, it seems that FailoverTransport is 
probably running a dedicated thread - unless client code has changed 
TaskRunnerFactor.DefaultTaskRunnerFactory.dedicatedTaskRunner from the default 
of true. I wonder if the use of [ThreadStatic] makes an assumption that it will 
_always_ be dedicated.
   
   It does look like I might need to do a separate PR anyway, so that I can 
rebase without having to force-push. But based on review, I'm no longer 
convinced that it's a quick case of reconcile conflicts and done.
   
   Meanwhile, I could revert my merge commit from this branch as well, since it 
caused a bad diff, with the whole FailoverTransport.cs appearing as a change - 
the original conflict was arguably better!
   
   A unit test for this functionality would require an SSL-configured broker to 
test against, or possibly a few different SSL-configured brokers with different 
protocols. I don't see any SSL-related unit tests at all.


----------------------------------------------------------------
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.

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


Reply via email to