The reference implementation of OSGi's JAX-RS Whiteboard is called Aries JAX-RS Whiteboard.
My question is, how and when does the factory method for the Whiteboard.class get called?
public static Whiteboard createWhiteboard(
Dictionary<String, ?> configuration) {
return new Whiteboard(configuration);
}
Like, for example, if I drop the jar into an Apache Felix instance?
I searched the whole project for the createWhiteboard symbol, but I did not find anything calling it. I know it is OSGi Runtime that does this, but how, where?
Ok, so I answered my own question.
The
Whiteboard.classis called by a separate "activator" class that implements the standardized OSGi callback interface,BundleActivator:CxfJaxrsBundleActivatorat line 76. This is analogous to the entry point of a program. Then, at line 105, therunWhiteboardmethod is called, which abstracts away the call tocreateWhiteboarduse a method that is perhaps way more complicated than it should be starting at line 198.The main calls in the stack in bottom-up order would be: