Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
5.5.0
-
None
-
None
Description
Note: I found this problem by reading code, not by an actual behavior problem!
In the latest revision of MessageListenerServlet.getAjaxWebClient() you can see that the ajaxWebClients map is read outside of a synchronized block and then edited inside the block. This looks like a simple mistake, and the get() should be moved down one line.
Theoretically, the downside of this bug will be that new clients will be unnecessarily created if a single web session connects to the servlet from two or more concurrent connections. In practice, this almost never happens because most ajax users of ActiveMQ should have only one connection in flight at a time.