How can I programatically track all users (or a list of users) for document creation, modification and deletion and log this stuff into a separate database. Is this possible from an Extension Manager?
Subject: *It is certainly possible through an extension manager.
Subject: RE: *It is certainly possible through an extension manager.
Can you please give me some advice. I wrote an Extension Manager but it runs on a client machine and is tracking changes only for the user for which the Notes client is configured. I need to extend this to work for more users. I need this extension manager to run on server (if possible) and also the tracking database to be on server to be accessible for all users.
Subject: RE: *It is certainly possible through an extension manager.
You can certainly write an extension manager to run on the server. Here are some things to keep in mind:- Your extension manager code will get called/initialized for EVERY server task loading (main server, router, agent manager, etc.), so if you want it only for the “main server”, check if the calling process is “server.exe”; otherwise get out.
-
Get a EMRecursionID and register NSFDBOpenExtended and NSFNoteUpdateExtended.
-
Open the db you’d want to “monitor”, store off its DBID (get it via NSFDbGetOpenDatabaseID) and keep the db open (important, otherwise the DBID will go out of scope)
-
Since your extension mgr code gets called on every NSFDBOpen and NSFNoteUpdate, you want to put some smarts into your code to only do its work if in fact the change happens in the db you’re interested in…to do that, compare the DBIDs (NSFDbGetOpenDatabaseID is very efficient) and if they don’t match, get out. (NSFNoteUpdate is called VERY OFTEN, so you want to make sure to not “hang in there” if the updates happen in a db you’re not interested in.
Thomas - IBM
Subject: RE: *It is certainly possible through an extension manager.
Thanks a lot!