0

Greetings,

Not sure if this is one for here or stackoverflow but here goes:

I have deployed a J2EE application on JBoss 4.2 with a MySQL backend. While stress testing the application I've discovered many:

 org.jboss.tm.JBossTransactionRolledbackException: Contention on read lock promotion for bean.  Exception in second transaction; nested exception is: 
javax.ejb.EJBException: Contention on read lock promotion for bean.  Exception in second transaction; - nested throwable: (javax.ejb.EJBException: Contention on read lock promotion for bean.  Exception in second transaction)

How would you advise I debug this?

Thanks in advance.

kobrien
  • 131
  • 10

1 Answers1

0

I solved this by creating a file called "jboss-container.xml" in ejbmodule/META-INF/.

The contents of this file is:

<container-configurations>

    <container-configuration extends="Standard CMP 2.x EntityBean">

        <container-name>DeadlockAvoidingConfiguration</container-name>
        <instance-cache>org.jboss.ejb.plugins.PerTxEntityInstanceCache</instance-cache> 
        <locking-policy>org.jboss.ejb.plugins.lock.NoLock</locking-policy>
        <commit-option>C</commit-option>
    </container-configuration>

</container-configurations>

I am aware that this is not an optimal solution (due to the effect on caching ), but it fixes the errors.

Feel free to add to this.

kobrien
  • 131
  • 10