This documentation is for WSO2 ESB version 4.5.1. View documentation for the latest release.

Configuring Mediators

Mediators could access the Synapse registry to load resources and configure the local behavior. Refer to the Spring Mediator and Script Mediator implementations for examples on how this could be achieved.

Loading of Extensions by the Synapse Runtime

Synapse loads available extensions from the runtime classpath using the J2SE Service Provider model. This essentially iterates over the available JAR files, for a META-INF/services directory within each file, and looks for text files with the name org.apache.synapse.config.xml.MediatorFactory and org.apache.synapse.config.xml.MediatorSerializer which contains a list of fully qualified classname that implement the above interface, listing each class in a separate line. For example, the built-in synapse-extensions.jar contains the following structure:

synapse-extensions.jar
    /META-INF/services
        org.apache.synapse.config.xml.MediatorFactory
        org.apache.synapse.config.xml.MediatorSerializer
    /... the implementation classes as usual...