RFR: 8346439: Allow late binding of module services in custom layers

David M. Lloyd duke at openjdk.org
Tue Dec 17 16:34:49 UTC 2024


Custom module layers allow for lazy loading, late binding, and full customization of module dependencies through the `Controller` API. However, it is not possible for custom layer users to late-bind services, which has prevented some popular application containers from moving to use Java modules.

Add an API to `ModuleLayer.Controller` to allow adding `uses` and `provides` relationships after a module has been defined for custom layers.

-------------

Commit messages:
 - 8346439: Allow late binding of module services in custom layers

Changes: https://git.openjdk.org/jdk/pull/22796/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22796&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8346439
  Stats: 47 lines in 1 file changed: 47 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/22796.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22796/head:pull/22796

PR: https://git.openjdk.org/jdk/pull/22796


More information about the core-libs-dev mailing list