https://issues.apache.org/jira/browse/AMQ-5106 - apply patch with thanks from carlo cancellieri - This closes #17