On Nov 16, 2007 11:09 AM, Adam Hardy <[EMAIL PROTECTED]> wrote: > To answer your question, I haven't had to do much to plug in OpenJPA and > Struts2 > together - in fact, I haven't had to do anything apart from decide whether I > wanted to have a filter or a Struts2 interceptor or a Spring interceptor for > OpenEntityManagerInView. > > I chose the filter because it implements a standard (Servlet) and would cater > for DWR integration too.
I started with an Inteceptor, but now I'm thinking of a filter too, since, as you say, it would support service-type uses, like DWR or XFire. If you'd like to share your filter implementation, feel free to attach it to https://issues.apache.org/struts/browse/WW-1399 > Concerning optimistic locking, I've got version fields on all my persistent > objects, mapped to version columns. I haven't got this whole thing working yet > since it's in the process of migrating from Spring MVC / non-JPA Hibernate and > there's alot of testing framework code to put through the mangler first. So > I've > yet to overhaul the versioning or the identity fields (praying for smooth > passage). I'm thinking that it would be nice to have some sort of stock Result that could be used in the event of a optimistic locking exception, and at least try to display the affected values, or perhaps even offer to recover if the edit values are not the same ones that the other user changed. -Ted. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]