add in some transaction middleware (bug 875319)