On Sun, Dec 31, 2017 at 10:06 AM, Michał Zegan <webczat_...@poczta.onet.pl> wrote: > Is that planned to be added? Or even needed? I wanted to compare jpms > api to jboss-modules and seems to me that jboss-modules does not have > the dependency modification capability at all at the first glance.
JBoss Modules does allow modification of dependencies and even unloading of modules, however it must be done carefully (of course) with an understanding of how class loading works. This is not something that you will commonly want or need to do, because Java class linkage is a one-time operation. This means that if your module X depends on module A and a class from X links to a class form A, and you change the dependency from module A to module B, X will still have a connection to module A via the already-linked class. This is possibly the simplest example of where problems may begin. That said, the JBoss OSGi project uses this feature to implement its relinking capabilities. It mitigates the possible problems by way of its service container which helps to minimize the risk of problematic activity. -- - DML