This commit replaces the use of a synchronous receive operation using JmsTemplate by the use of JmsListener. The latter makes sure that the handling of the request and sending the response happens in the same session and that should hopefully fix the flakiness of this test. Closes gh-1539