To your specific case, if you are annotating attributes, not getters, you could use the standard java.beans.PropertyChangeSupport and notify changes on each setter, and then add PropertyChangeListeners. Since fields are accessed directly by OpenJPA, the standard persistence logic wouldn't trigger your listeners, only properties you have changed.
Luis Fernando Planella Gonzalez Em Sexta-feira 26 Junho 2009, às 08:53:52, Daryl Stultz escreveu: > On Thu, Jun 25, 2009 at 1:58 PM, Michael Dick <[email protected]>wrote: > > > I agree, in general the application *should* not need to know whether an > > entity is dirty. > > > Not only do I regularly need to know when it's dirty, I often want to know > which properties have changed. The common case is setting modified on / by > properties. Does anyone else do this kind of thing, and if so, how? > > >
