| @gunnar.morling
why is it that the ValidationExtension class should be exported at all? So far I regarded it as an implementation detail really, which is discovered via the service loader. I.e. it's not a public API really and thus ideally shouldn't be exported.
In Payara and GlassFish at least the (Weld) service loader finds the META-INF/services file by itself, but when loading the class it lists, it will still eventually go to the OSGi class loader, which then can't find the package the class is in being exported by any bundle, and will thus not load the class, and therefor not execute the extension.
Is this really needed? We don't compile against that class so why is it an import for the package should be added?
Compile time it's not needed, but it's the same story as above. The type is encountered at runtime, the class loader tries to load it, eventually ends up at the OSGi class loader, and then rejects it since the package is not being imported. See this stack trace for instance:
|