jersey
  1. jersey
  2. JERSEY-335

Jersey should be able to ask the IoCComponentProviderFactory to resolve types

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: icebox
    • Component/s: core
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      335

      Description

      Extract from todays (23 july 2009) discussion on
      "users@jersey.dev.java.net" with title "IoCComponentProviderFactory and
      injection of Jersey-based artifacts"

      Conclusion:
      Need a solution for Jersey to ask the IoCComponentProviderFactory if it can
      resolve types. Thus an implementation of IoCComponentProviderFactory could also
      implement InjectableResolver:

      // Resolve scope + type + annotations to an instance
      public InjectableResolver

      { Injectable<?> getInjectable(Scope s, ComponentContext cc, Type t); }

      When Jersey injects for constructor, field and methods, if it cannot resolve an
      injection point from its own registered injection stuff it can defer to the
      InjectableResolver implemented by the IoCComponentProviderFactory
      implementation. This has the advantage that as well as constructors, resource
      methods, sub-resource methods and sub-resource locators can also have stuff
      injected as supplied by the IoCComponentProviderFactory.

      For the solution where the IoC framework manages life-cycle i think we need the
      IoCComponentProviderFactory implementation to get an instance of
      InjectableResolver from Jersey. Thus for constructor the factory can use the
      InjectableResolver.

        Activity

        Hide
        deepakjacob added a comment - - edited

        Please find the Screenshot of Jersey Component Provider and Provider Factories. It would be great if proposed changes are taken in a holistic manner.

        Show
        deepakjacob added a comment - - edited Please find the Screenshot of Jersey Component Provider and Provider Factories. It would be great if proposed changes are taken in a holistic manner.

          People

          • Assignee:
            Unassigned
            Reporter:
            mmc41
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: