Hi,
I need a way to synchronize 2 databases (LOCAL AND REMOTE) :
* the 2 databases have identical schemas
* the 2 databases use the same database engine but the database engine can be oracle, sql server, mysql sql, ... => so i use DataAccessAdapter to manage it
* changes will only be take into account on the LOCAL database
The typical scenario would be
* create a dump of the REMOTE database and overwrite LOCAL database with this dump
* each time user modify the LOCAL database (insert, update, delete), log the query in a file (or in a database table)
* when synchronization is needed, just reinject the queries to the REMOTE database
So, what I would need is to log the query in a way I would be able to reexecute it (and not just for information) ?
1) To detect, changes on LOCAL database, I thought using audit interceptor or override DataAccessAdapter method? Is it the right place?
2) To log the query, is it possible to use TraceListener or can you give me a better way ?