Benefits of OSGi Plugins
OSGi Plugins can be deployed and hot-swapped at runtime without needing an application server restart/reload. OSGi plugins:
- Are easy to develop and deploy on a running dotCMS system.
- Provide methods to easily implement new functionality in dotCMS via understandable extension points.
- Provide a separate class loading environment in which you can deploy different versions of common libraries used by dotCMS (other than those provided by dotCMS out of the box).
- Can interact with dotCMS's classloader to override any class inside dotCMS.
- Can be Push Published between environments.
- Are stored as plain OSGi bundles.
⚠️ Important Notes Regarding Plugins
Plugins, even those that are developed by dotCMS, live outside of the dotCMS core system and are not supported by dotCMS without an additional OSGi support engagement. dotCMS Plugins are made available as examples; are not guarenteed to work; and are updated “lazily”, or as needed, by dotCMS staff.
Plugins in dotCMS are powerful and can modify the dotCMS platform and even underlying OS when needed. There is no sandbox around an OSGi plugin to protect against problems with the plugin.
- By definition, plugins override dotCMS code.
- This means they can not be sandboxed for safety.
- This makes them more like operating system drivers - which give you the flexibility to change anything, but also the potential to break existing functionality in ways that dotCMS can not protect against.
- All plugins run the risk of breaking existing dotCMS functionality.
- Although many plugin changes can be done relatively safely, there is always a chance that, when you activate your plugin, your dotCMS installation will not work properly.
- If this happens, you will need to uninstall your plugin and fix the problem.
- Plugins can be uninstalled by modifying files in the dotCMS installation folder; for more information, please see the documentation referenced below.
Where to find example plugins
dotCMS makes two plugin repos available to provide starting points for your own plugin development. Again, caveat-emperator, as these plugins, even those that are developed by dotCMS, live outside of the dotCMS core system and are not supported by dotCMS without an additional OSGi support engagement. These Plugins are made available as examples; are not guarenteed to work; and are updated “lazily”, or as needed, by dotCMS staff.