The Hundred-Kilobyte Kernel (HK2) provides a module system and component model for building complex software systems. HK2 forms the core of GlassFish Server's architecture.
The module system is responsible for instantiating classes that constitute the application functionality. The HK2 runtime complements the module system by creating objects. It configures such objects by:
Injecting other objects that are needed by a newly instantiated object
Injecting configuration information needed for that object
Making newly created objects available, so that they can then be injected to other objects that need it