I'm using jboss-4.0.3SP1 and PostgreSQL 8.0.
I created an entity bean (ProductsEBean) which has
a productId column and a version (@Version) column.
I created also a stateless session bean with a method
saveAll() which takes a List of ProductsEBean as argument
and has a @TransactionAttribute annotation.
This method persist all entity beans found in the List,
but it works only the first time I try to call it.
The second time it throws an javax.ejb.EJBException with this
Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [it.aliaslab.crb.ejb3.entity.ProductsEBean#]
If I remove the version column in the entity bean, all
seems to work fine, and the exception is never thrown.
I tried to configure my persistence.xml file, adding
the property :
but this does not works.
what's the reason of this error?
thanks to everyone.