problem in deleting record

Posted by akshay on Stack Overflow See other posts from Stack Overflow or by akshay
Published on 2011-01-08T14:27:57Z Indexed on 2011/01/08 14:54 UTC
Read the original article Hit count: 158

Filed under:
|
|
|

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
}

© Stack Overflow or respective owner

Related posts about java

Related posts about hibernate