Hi Josef,

Josef Wagner wrote:
Hello List,

I want to log all data manipulations (update, delete, insert) from the
PersistenceBroker in a separate log-table for synchronising client- width
server-database.

First, I have written an own PersistenceBroker (extended from
PersistenceBrokerImpl) which overrides the store- and delete method's.


Did you notice the OJB listener to track persistent object events:
http://db.apache.org/ojb/docu/guides/pb-guide.html#Hook+into+OJB+-+PB-Listener+and+Instance+Callbacks
http://db.apache.org/ojb/api/org/apache/ojb/broker/PBLifeCycleListener.html

You can write your own PB implementation which add your tracking instance as permanent PBLifeCycleListener or without extend the PB by adding your tracking instance as temporary listener on each PB lookup.

Now, I can log all exception the changes on M-N-tables.

Can anyone tell me how I can get note of changes in m-n-tables.


Well this is a problem, because the population of indirection tables of non-decomposed m:n relations are handled internally by OJB. The intern class used for handling m:n events is MtoNBroker.java. In theory you can extend this class too and use it in your PB implementation (disadvantage: internal classes can be changed often).

regards,
Armin


Thanks a lot!

Regards

Josef Wagner



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to