When I changed entity cache to use OPTIMISTIC locking (it uses pessimistic by default) it seemed to make a difference when I hot-changed the cache file, but not from after a restart. After a restart there were lots of exceptions like
2009-03-12 18:43:10,875 WARN [org.jboss.cache.interceptors.TxInterceptor] Rolling back, exception encountered
Caused by: org.jboss.cache.optimistic.DataVersioningException: Tx attempted to create /sa_XmTaskMgrInternal-ejb_jar,Xmotion/au/com/xmotion/xmattribute/ejb/orm/AttrValue/au.com.xmotion.xmattribute.ejb.orm.AttrValue#87616 anew. It has already been created since this tx started by another (possibly remote) tx.
After restart optimistic cache - 20 simultaneous requests - 60sec
After restart optimistic cache - 20 simultaneous requests with 20sec rampup period - 16sec
After restart pessimistic cache - 20 simultaneous requests - 45sec
After restart pessimistic cache - 20 simultaneous requests with 20sec rampup period - 16sec