Product Documentation

Database Administrator's Guide

Previous Topic

Next Topic

PLUGIN_CALLBACK

Record update callbacks are file-based, loading a DLL/SO library on physical file open and unloading the DLL/SO on file close. This design leads to difficulties for more complex callbacks that attempt to maintain longer-term state information. To address this, the PLUGIN keyword functionality has been extended to support loading generic, user-defined libraries once at server startup, and unloading them at server shutdown.

This is enabled by setting in ctsrvr.cfg:

PLUGIN_CALLBACK <LABEL>;<DLL>

where:

  • <DLL> - The library that will be loaded at server startup, and unloaded prior to shutdown.
  • <LABEL> - The name used when referencing this plugin in CTSTATUS.FCS error messages.

When the library is loaded at startup, it must export the following function:

int ctDECL ctPlugin_describe(char * name,size_t * size,int request)

and may optionally provide the following functions:

Example

An example implementation is provided in ctrucbdll.c.

Note:

Currently, only Record Update callbacks and Deferred Index callbacks can utilize this PLUGIN_CALLBACK functionality.

TOCIndex