eXist-db provides a pluggable module interface that allows extension modules to be easily
developed in Java. These extension modules can provide additional XQuery functions through a
custom namespace. The extension modules have full access to the eXist-db database, its internal API,
the context of the executing XQuery and the HTTP Session (if appropriate).

The source code for extension modules should be placed in their own folder inside
$EXIST_HOME/extensions/modules/src/org/exist/xquery/modules. They may
then be compiled in place using either $EXIST_HOME/build.sh
extension-modules or %EXIST_HOME%\build.bat extension-modules
depending on the platform.

Modules associated to modularized indexes should be placed in the
$EXIST_HOME/extensions/indexes/*/xquery/modules/* hierarchy. They will
be compiled automatically by the standard build targets or as indicated above.

eXist-db must also be told which modules to load, this is done in
conf.xml and the Class name and Namespace for each module is listed
below. Note - eXist-db will require a restart to load any new modules added. Once a Module is configured
and loaded eXist-db will display the module and its function definitions as part of the function library page or through
util:decribe-function().

1. Example Module

Demonstrates the simplest example of an Extension module with a single function. A good
place to start if you wish to develop your own Extension Module.

7. JNDI Directory Module

This extension module allows you to access and manipulate JNDI-based directories, such
as LDAP, using XQuery functions. It can be very useful if you want to integration and LDAP
directory into an eXist-db/XQuery based application.

To compile it, set the parameter include.module.jndi = true in
$EXIST_HOME/extensions/local.build.properties file (create it if missing).