I am looking for something like ServiceLoader, but which does not depend on the SPI file, where all implementations of the service must be listed, and then added to the path of some class loader so that they can be found.
Let's say there is an application that has an interface and some service implementations. What structure can be used to add a new JAR to the application that contains some new implementations, and can they be automatically added to the class path of all class loaders inside this application? All class loaders are very important here, because if this is a NetBeans module application, the NetBeans platform does weird magic, and you never know which class the loader is used with, which thread, which class, etc ... It would It is also great if the application does not need to be restarted to find a new JAR, but this is not an important requirement.
I already heard about OSGi, but it seems too big, and I need only 1% of its capabilities.
Thanks for any suggestions!
source
share