glassfish-hk2
glassfish-hk2 copied to clipboard
Add API for validating all injection points
There has been a request for "fail-fast" behavior from HK2. Since HK2 is a dynamic system, it tends to defer analysis of injection points until the latest possible moment. This request is to add a validation API that would ensure that every non-optional injection point has at least one valid injectee.
Other things to think about:
1. Calling such a method would cause all descriptors to become reified, which is an large performance hit in some systems (such as GlassFish) 2. The security aspects of the call would be of interest, as all the lookups would be done under the security credentials of the caller 3. I wonder if there could be an option on it to validate whether any injection point has MORE than one possible answer 4. Obviously this would be for the snapshot of the system as it exists at the time of being called
- Issue Imported From: https://github.com/javaee/hk2/issues/236
- Original Issue Raised By:@glassfishrobot
- Original Issue Assigned To: @jwells131313
@glassfishrobot Commented Reported by @jwells131313
@glassfishrobot Commented @jwells131313 said: For systems such a Jersey who do not use non-reified descriptors and which has an application lifecycle it might be interesting to have fail-fast behavior.
@glassfishrobot Commented This issue was imported from java.net JIRA HK2-192