Could you explain a bit more how your application look like and what version of JBoss you use exact, also where the Optimistic Lock is from.
I suppose you use EJB2 or JPA?
In general an OptimisticLock Exception is thrown if you change data concurrent to ensure consistency.
So in case of such problem you can simple retry the invocation.
We are using jboss version "jboss-as-7.1.0.Final"