My problem resolved. I have declared entity object globally so that I got this error. Now I declare separate object in each method and my problem is solved.
Explanation : As entity object is globally declared all methods run on same object. They are not able to do operations on database by same object and transaction get failed.