resolve https://issues.apache.org/activemq/browse/AMQ-2478 - patch applied with thanks. test case works with the new kahaDB also, it is a little neater w.r.t exception handling