reta commented on a change in pull request #603: [CXF-8161] fix memory leak and
thread leak in JMSDestination
URL: https://github.com/apache/cxf/pull/603#discussion_r351051429
##########
File path:
rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
##########
@@ -174,9 +174,9 @@ public void onException(JMSException exception) {
}
}
- protected void restartConnection() {
+ protected synchronized void restartConnection() {
Review comment:
I think with the current implementation, it could be an option to consider,
but in general, the `ExceptionListener` is a black box for
`PollingMessageListenerContainer`, it is actually `JMSDestination` which makes
things worst: it tries to reconnect within the callback. Between these two
patches, I would personally prefer to stick with your first idea,
`synchronized` over `restartConnection`. Thank you.
----------------------------------------------------------------
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]
With regards,
Apache Git Services