Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-2166

Auto-loading of Cayenne modules

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.M5
    • None
    • None

    Description

      We need to borrow the central modularity feature from bootique.io - module auto-loading based on Java ServiceLoader:

      1. Each module in Cayenne (or custom modules if a user so desires) will ship with "META-INF/services/org.apache.cayenne.di.spi.ModuleProvider" file that will contain the name of the provider class.

      2. Provider will contain a factory method for the module, as well as a method that returns a collection of modules that this module "overrides"

      3. There will be a loader class that will load all providers via "java.util.ServiceLoader", create modules for each provider and then sort them in the order of override dependencies.

      4. ServerRuntimeBuilder will contain a method to turn auto-loading on and off. "on" will be the default.

      Attachments

        Activity

          People

            andrus Andrus Adamchik
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: