Class HK2DebugBundle

  • All Implemented Interfaces:

    public class HK2DebugBundle
    extends UniqueGuiceyBundle
    in the next version HK2 support will be removed and bundle will become useless
    Bundle enables debug services to check correct extensions instantiation:
    • JerseyManaged annotated service must be instantiated by HK2 and not guice
    • Other services must be instantiated only in guice

    When enabled, exception will be thrown when service instantiated outside of assumed bound (or duplicate instantiation occur).

    Checked only beans registered by JerseyInstaller (ResourceInstaller, JerseyProviderInstaller or any 3rd party installer implementing jersey installer interface).

    Module intended to be used in tests. ContextDebugService collects all tracked classes instantiated by both guice and HK2 and may provide lists of classes accordingly. It may be used in test conditions.