You should not avoid this exception, see below from MZ notes
--------------------------------------------------------------------------
Optimistic locking is a technique that is used to insure that updates to the database data
corresponding to the state of an entity are made only when NO intervening transaction
has updated that data for the entity state since the entity state was read. This insures that
updates or deletes to that data are consistent with the current state of the database and
that intervening updates are NOT LOST. Transactions that would cause this constraint to
be violated result in an OptimisticLockException being thrown and transaction ROLLBACK.
Portable applications that wish to enable optimistic locking for entities must specify @Version
attributes for those entities - i.e., persistent properties or fields annotated with the @Version
annotation or specified in the XML descriptor as version attributes. Applications are strongly
encouraged to enable optimistic locking for all entities that may be concurrently accessed or
merged from a disconnected state. Failure to use optimistic locking may lead to inconsistent
entity state, lost updates and other state irregularities. If optimistic locking is not defined as part
of the entity state, the application must bear the burden of maintaining data consistency.