Uploaded image for project: 'Camunda Optimize'
  1. Camunda Optimize
  2. OPT-1562

Isolate classloading for plugins in Optimize

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Done
    • Priority: L3 - Default
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.6.0, 2.6.0-alpha1
    • Component/s: backend
    • Labels:
      None

      Description

      Context:
      Currently, when a user implements an Optimize plugin and adds a third party library as a dependency that we also use in Optimize, this might cause Optimize to crash.
      We should make sure that classes from plugins are loaded over classes from the Optimize fat jar, or in other words to isolate the classloading of the plugin classes with the ones of Optimize.

      AT:

      • classes from plugins are loaded from the plugins and isolated from the Optimize classes, with exception of the ones in the plugin interfaces (since to communicate between plugin and Optimize, these need to be the same classes, i.e. loaded by the same class loader)
      • this behavior is documented in the plugin section of the technical guide
      • the camunda optimize example repository also contains a hint on that

      Hint:

      • Consider having dedicated classloaders per plugin, so people can always package what they need for their plugin without side-effects on either the application or other plugins
      • If possible add a warning to the log that a plugin contains dependencies that are also used in Optimize and have a different version and therefore the plugin might not work as expected.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            johannes.heinemann Johannes Heinemann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: