Context:
– JBoss 5.1.0GA
– Oracle9i
Problem:
During a long processing transaction, the ORA-02049 exception was thrown.
Solution:
According with metalink note 789517.1 “an ORA-02049 ‘timeout: distributed transaction waiting for lock’ error occurs when a session that is involved in a distributed transaction waits for another session’s TX enqueue (row lock) for longer than the database distributed_lock_timeout. What constitutes a ‘distributed transaction’ is what generates confusion on this topic. Any operation that uses a database link – even a query – starts a distributed transaction. An ORA-02049 ‘timeout: distributed transaction waiting for lock’ error occurs when a session that is involved in adistributed transaction waits for another session’s TX enqueue (row lock) for longer than the databasedistributed_lock_timeout. What constitutes a ‘distributed transaction’ is what generates confusion on this topic. Anyoperation that uses a database link – even a query – starts a distributed transaction.”
After adding some extra properties in my oracle-xa-ds.xml:
<set-tx-query-timeout>30</set-tx-query-timeout> <query-timeout>300</query-timeout> <blocking-timeout-millis>5000</blocking-timeout-millis> <idle-timeout-minutes>15</idle-timeout-minutes> |
and setting the flush mode to commit
entityManager.setFlushMode(FlushModeType.COMMIT); |
the problem was solved. No more ORA-02049 🙂
Finally, there’s another very important peculiarity of what does Cialis that brings it so high above its alternatives. It is the only med that is available in two versions – one intended for use on as-needed basis and one intended for daily use. As you might know, Viagra and Levitra only come in the latter of these two forms and should be consumed shortly before expected sexual activity to ensure best effect. Daily Cialis, in its turn, contains low doses of Tadalafil, which allows to build its concentration up in your system gradually over time and maintain it on acceptable levels, which, consequently, makes it possible for you to enjoy sex at any moment without having to time it.
Keep posting stuff like this i really like it
June 15, 2010 at 8:40 amthis post is very usefull thx!
June 22, 2010 at 6:35 pmThanks. Very nice.
October 27, 2010 at 1:24 pmCould you explain WHY this fixed the problem?
May 8, 2011 at 4:59 pm