Add simple two-phase commit implementation.