AnnotationManager: persistence layer [re]initialization
When using the server-based persistence layer, Annotations that have previously been processed/imported will remain in the DB and can be immediately queried. The Metacat plugin, however, currently loops through every annotation document it finds during restart to load into this DB. We should add a configuration switch that is set in Metacat once the annotations have been imported so that it only happens once (and again when Metacat is upgraded/redeployed in the future, but not on every application restart). This is very similar to how the spatial cache works. Typically the annotations will be processed individually when they are inserted/updated/deleted (using the event handler).
Note: this will not work if we are using the in-memory Derby DB (like we would in Morpho and other smaller client-side deployments of the SMS library).
Updated by ben leinfelder over 12 years ago
now a flag is set on metacat indicating that the annotations have been initialized. subsequent restarts of the web app container will not result in reinitialization. When the application is redeployed or upgraded, the initialization flag will be reset and annotation will be processed again. you can invoke the 'initialize' action on the semtools plugin at any time if need be by using metacat?action=initialize.