put all the api under transaction management (bug 849080)