This might be a silly question, but I am puzzled by it and I could not find any clear explanation anywhere.
HK2 is a dependency injection framework implementing JS330, the foundation of Glassfish V3 and V4. As far as I can see it is used by Jersey
Weld is the reference implementation for CDI which is again a dependency injection framework and can also be used in Glassfish?
So my questions are these
- Are they different implementations of the same spec?
- Are they implementations of different specs?
- Under what circumstances shall I use one or the other?
I understand that the questions arise from my meagre understanding of the whole ecosystem of Java EE but any answers will be greatly appreciated