ORA-02049: timeout : distributed transaction waiting for lock
920005Mar 28 2012 — edited Apr 26 2012Error received:
"ORA-02049: timeout : distributed transaction waiting for lock."
Steps to reproduce error:
Service 1 (DatabaseAdapter 1)-->inserting into table1
Service 1-->calls service 2 through wsdl
Service 2 (DatabaseAdapter 2)--> updating table 2 (Important: table 2 has foreign key to table1, If foreign key dropped then error resolved)
Current weblogic connection pool configurations:
Both DatabaseAdapters connections are "oracle.jdbc.xa.client.OracleXADataSource" and connecting to RAC
Conclusion:
It looks like each DatabaseAdapter is opening its own session which is causing the Lock error.
My Questions:
How to resolve this and have both adapters use same session?