Is there any documentation of the different types of locking available in jboss 3.x with information about the pros/cons of each type of locking?
Also, can I change the locking behavior just by add in a locking tag in the jboss.xml file of my ejb jar?
this is an old message of mine.
to let you know we solved our problem in the end by using one of the "instance per transaction" container configurations, with commit option C - (and we actually use the excellent MVCSoft for CMP persistence - for performance reasons).
this config. scales well as opposed to the default config. which (IMO) doesn't scale AT ALL for most normal (ie multi user applications).
luckily jboss is highly configurable and comes with several pre-defined container configurations for different situations - some are more applicable for enterprise systems, others for clustered systems and others for single user or read-mostly applications.
you need to be careful which one you choose since the default config. only keeps one instance of each entity and pessimistically locks on it whether on or not it is changed in the transaction - hence is prone to deadlock.
you can of course roll your own, and choose your own combination of locks and interceptors but if you careful you may end up with a config that either defies the ejb spec, loses ACIDity or has other problems.
all of this is documented in the paid jboss docs.