problem in deleting record
- by akshay
I have a entity manager em1 .em1 starts a transcation tx on db1 table1.Now inside tx i call a API getdata().This API creastes a new entitymanger em2 and return 1 record.Now if entity manger em1 tries to delete the record returned by em1 , it hangs.Code times out.Is the record locked by em1.How can ii solve this problem?
create em1
//em1 start transcation tx1
tx1.start
Object r = getData();
em1 tried to delete r //code hangs here
tx1.commit
Object getData(){
create em2
return data found using em2
}