https://bugzilla.redhat.com/show_bug.cgi?id=959516 cherry-pick of https://issues.jboss.org/browse/HORNETQ-1351