Ajay Aggarwal on 28/11/07 17:00, wrote:
Hi,

I wanted to know why openJPA uses
"org.apache.openjpa.util.OptimisticException" and not
"javax.persistence.OptimisticLockException". In my code I wanted to
catch this exception and take appropriate action. However I didn't want
my code to become dependent on OpenJPA. I wanted to limit OpenJPA
dependency to persistence.xml
Am I missing something?

Hi Ajay,


org.apache.openjpa.persistence.OptimisticLockException

extends

javax.persistence.OptimisticLockException

I would suggest that the circumstances under which OptimisticException is thrown would give a clue as to why it and not OptimisticLockException is being used.


regards
Adam

Reply via email to