back port https://issues.jboss.org/browse/HORNETQ-1264