Andrus Adamchik created CAY-2166: ------------------------------------ Summary: Auto-loading of Cayenne modules Key: CAY-2166 URL: https://issues.apache.org/jira/browse/CAY-2166 Project: Cayenne Issue Type: Improvement Reporter: Andrus Adamchik Assignee: Andrus Adamchik
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. -- This message was sent by Atlassian JIRA (v6.3.4#6332)