I'm using <locking-policy>org.jboss.ejb.plugins.lock.SimpleReadWriteEJBLock</locking-policy> on an entity bean and under load i get the following exception
javax.ejb.TransactionRolledbackLocalException: Contention on read lock promotion for bean. Exception in second transaction
I have ready about this locking policy (SimpleReadWriteEJBLock) and it says:
If there is already a reader that is promoting, we throw an inconsistent read exception.
I'm afraid i might not be using the transaction infrastructure well because it seems that if i have 2 readers that try to promote for write lock then i have this exception, is there anything i can do so that my case would be resolved and i wont have this exception?