added first pass on acquiring and releasing locks in xg transactions