Could you attach the thread dump when the hang occurs.
As far as i can see there is nothing wrong with your code.
There were a few enhancements done to the embedded mode in V2 (in Open MQ), this issue could be be because of that.
[Message sent by forum member 'rampsarathy' (rampsarathy)]