Basically the question is this one. It seems that in JBoss 7 pesimistic locking is enabled on EJB’s by default. We were able to turn it off in standalone.xml (this fixing the problem we were having and confirming that this is the cause), but we need to do it programatically either via configuration in our EJBs (preferred) or via the CLI of JBoss. How can we do that?
Turning off the locking in the EJB’s is also an option (as we handle it in the database anyway).
We figured it out. The correct command line setting is:
default-entity-bean-optimistic-lockingIt needs to be set to true.