Some time ago I realized that while we added build compatible extensions, we didn't allow users to register them in SE programmatically.
The only option in SE is to discover them which is unfortunate as you often want a purely synthetic bean archive (to keep it minimal).
The SeContainerInitializer already allows this for portable extensions, see this code.
We could easily add an extra method with the same capability.
public abstract SeContainerInitializer addBuildCompatibleExtensions(Class<? extends BuildCompatibleExtension>... extensions);
Note that I am currently adding the same in Weld under this issue but I really think this should be in spec API.
Some time ago I realized that while we added build compatible extensions, we didn't allow users to register them in SE programmatically. The only option in SE is to discover them which is unfortunate as you often want a purely synthetic bean archive (to keep it minimal).
The
SeContainerInitializer
already allows this for portable extensions, see this code. We could easily add an extra method with the same capability.Note that I am currently adding the same in Weld under this issue but I really think this should be in spec API.