put the transaction listener inside a thread