a) don't use the simple monitor for this. instead:
- implement your own monitor/extender classes
- don't implement anything in the monitor, instead keep your complete implementation (and all cursors you need to perform your updates/logging) in the extender. There will be one instance of the extender per cursor you are monitoring. as the cursor will never be used in a multi threaded way your extender doesn't need to be threadsafe.
b) never use any of the nxdb components in a monitor/extender. Instead: directly use the core server API defined in nxsdServerEngine.
c) make sure the cursor you are using to log your changes belongs to the same database/session as the cursor you are extending, otherwise transaction processing will not work as you expect.
for b) and c) if your extender is extending a TnxServerCursor, you can us the Database property of that to get hold of the TnxServerDatabase object owning that cursor. The database object has a CursorOpen function that allows you to open other cursors owned by the same database and living in the same transaction context as the cursor you are extending. You can create that cursor when your extender is created and store it in the extender object. You won't need to do anything about transactions because there will always be an implicit or explicit transaction already active when your extender is notified about any of the eaRecord* events.For a complete example of how to implement monitors/extenders please take a look at the RefIntegrity classes in the bonus directory.