Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-dev] org.eclipse.persistence.exceptions.OptimisticLockException vs javax.persistence.OptimisticLockException

Hi,
 
I am currently working on enabling optimistic UPDATE batching on MaxDB. I am observing that if I enable batching, an org.eclipse.persistence.exceptions.OLE is thrown whereas if I disable batching a javax.persistence.OLE is thrown.
 
What is the intended behaviour?
 
Should I get an org.eclipse.persistence.exceptions.OLE if working with the native API and an javax.persistence.OLE if working with JPA?
 
I noticed that the method RepeatableWriteUnitOfWork.commitToDatabase does a conversion but is not on the call stack in case of batching. Also, RepeatableWriteUnitOfWork resides in foundation/core. Why does it convert to a JPA exception then?
 
Moving the exception-conversion up to RepeatableWriteUOW.commitRootUnitOfWork would likely give a uniform javax.persistence.OptimisticLockException. But this would also affect the native API, I am afraid.
 
Basically, I am not sure how to sort this out correctly.
 
-Adrian
 
 
 
 

Back to the top