« Fault Loading + Extended Transactions + Cascades = Optimistic Lock Exceptions | Main | Fault Loading + Extended Transactions + Cascades = Optimistic Lock Exceptions »

Fault Loading + Extended Transactions + Cascades = Optimistic Lock Exceptions

Foiled again by EJB3 and JPA. Just when I thought that switching to EXTENDED transaction mode had solved my problems, I began seeing optimistic lock exceptions.

To make a very long and trying series of events very short, I have to move forward under the assumption that fault loading does not exist. Life would be great if it did. With respect to the OpenEJB developers, just because something should work doesn't mean it will. Nowhere in the EJB 3 spec is it mentioned, I can find no reference to it online aside from an e-mail between the OpenEJB and OpenJPA devs, and that e-mail sounded inconclusive. If it does exist, it's called something else or is a feature specific to OpenEJB.

Even so, I got a world class education in transaction mechanics today from David Blevins and Dain Sundstrom. So, Kudos to them both for slogging through my code with me. I'm going to turn my attention once more to JPA fetch groups and see if I can nail down the problem I was having with those earlier. It had something to do with concurrent modification exceptions, but with this new explicit control over transaction duration, I might be able to circumvent the problem entirely.

Moral of the story: if it's not in the spec, it's not a feature.

TrackBack

TrackBack URL for this entry:
http://blog.lib.umn.edu/cgi-bin/mt-tb.cgi/60863

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)