GlassFish modules should move away from using non standard Classes like Habitat and use standards based annotations and classes as specified by jsr 330(javax.inject.Inject, javax.inject.Provider etc.). To quote Jerome: "Classes like Habitat exposes too many APIs available to the users that makes the hk2 evolution very difficult. " Also some of the APIs are unclear (when to use habitat.getComponent() versus habitat.getByType() /habitat.getByContract() ).
So, the first step is to move away from Habitat (where ever possible) and use jsr 330 interface and annotations.
In order to do this, the hk2 team will be making the following changes to the GlassFish modules as described here ...