Merge pull request #1867 from clebertsuconic/2.2.eap5

- Back port of HORNETQ-1342 and BZ1141873 into EAP5 HornetQ branch