Since I am also a WebLogic + Oracle user and had deadlocks with them, I'm interested in this issue.
I can't believe default isolation level is serializable.
Could you tell us yourtransaction attributes (all Required?) in ejb-jar.xml and pool configuration in jboss.jcml?
And one more question. How did you detect the deadlock: SQLException, JBoss console or else?
we have detected the deadlock in several ways: trace files in Oracle, and SQLException(ORA-00060).
My EJB(1) is with transaction REQUIRED, it calls another three EJBs(they only performs reads) with MANDATORY transaction.
If I make an Entity Bean for the table I can update from the EJB(1), would the performance go down? Now this EJB is called ~5 times/second, but probably it will raise to ~15 times/second in a few months.
Jose R. Díaz
>My EJB(1) is with transaction REQUIRED, it calls another three EJBs(they only performs reads) with MANDATORY transaction.
The session transaction seems to be too long. In the transaction, it is involved with operatons to cause row lovel locks, such as insert, update and delete.
If a sesion transaction conflicts other transactions caused by row locks, you may get the ORA-00060. They say we can avoid deadlocks by resource ordering. So review your code of session bean and find access pattern that causes deadlocks. This is my first advice, but I know this is difficult for complicated case as yours.
My second advice is to redesign the transaction demarcation of your beans. This is an easier one.
To make the updating transaction shorter, for example, you have some options to change the transaction attributes:
1) Session: 'Required'
2) Session: 'NotSupported'
It depends on your requirement which is best option for you.
>If I make an Entity Bean for the table I can update from the EJB(1), would the performance go down? Now this EJB is called ~5 times/second, but probably it will raise to ~15 times/second in a few months.
If you access the bean in a transaction, it doesn't cost so much because the entity object is cached in the ejb server. If you follow my advice, however, the transactions of entity beans become shorter and ejbStore() is called at end of each transaction. Thus I say that again - it depends on the design of transactions.
BMP is another option as you wrote in first message. My favorite combination is BMP + CMT. I usually make a session bean with 'Supports' or 'NotSupported' to list value objects from entities not to use finder methods.
I'd like to hear JBoss expert's ideas.
Correct me if my advice is inadequate.
I have a similar problem with my BMP. It's seems that there is some problem woth Oracle XA transaction.
I use the Xdoclet tags @ejb:transaction type="RequiresNew" for some methods of the bean remote interface, and after some times, the pool hang and I see the charges when the connection pool is closed !?
Any idea ?