https://issues.jboss.org/browse/HORNETQ-1351

https://bugzilla.redhat.com/show_bug.cgi?id=1106730 
cherry-picked the fix for HORNETQ-1351 into 2.3 branch.