Added some assertions to enforce the atomicity of atomic.
Deprecated the old transaction management APIs.