12 Hookpoints

Service Provider Interface (SPI) mechanism is used to make Routing Hub more extensible. SPI provides an option to extend interfaces without modifying the core application. All we need to do is provide a new implementation of the service that follows certain rules and plug it into the application.

Using the SPI mechanism, the application will load the new implementation and work with it.

Below steps to follow for specifying implementation:
  • Extract the "cmc-obrh-ext-core-x.y.z.jar" (Extension Core) library from "cmc-obrh-service-x.y.z.war" artifact.
  • Create library by consuming extension core library of Routing Hub.
  • Specify the required implementations.
  • In order to get it discovered, provider configuration file has to be created under "META-INF" as below:

    Here, file name will be "PackageName.InterfaceName".

  • Specify the implementation in above file as below:

    Here, file name will be "PackageName.InterfaceName".

  • Inject the implementation library in "cmc-obrh-service-x.y.z.war" artifact.