glassfish-hk2 icon indicating copy to clipboard operation
glassfish-hk2 copied to clipboard

Add API for validating all injection points

Open glassfishrobot opened this issue 10 years ago • 4 comments

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

glassfishrobot avatar Mar 03 '14 14:03 glassfishrobot

  • Issue Imported From: https://github.com/javaee/hk2/issues/236
  • Original Issue Raised By:@glassfishrobot
  • Original Issue Assigned To: @jwells131313

glassfishrobot avatar Aug 30 '18 09:08 glassfishrobot

@glassfishrobot Commented Reported by @jwells131313

glassfishrobot avatar Mar 03 '14 14:03 glassfishrobot

@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 avatar Mar 03 '14 14:03 glassfishrobot

@glassfishrobot Commented This issue was imported from java.net JIRA HK2-192

glassfishrobot avatar Apr 26 '17 10:04 glassfishrobot