jersey
  1. jersey
  2. JERSEY-2291

Support @Immediate services by default

    Details

    • Type: Improvement Improvement
    • Status: Reopened
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.5.1
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None

      Description

      HK2 has added a new feature called @Immediate services. These are services that are started as soon as they are bound into the system. It would be nice for Jersey to support this scope/context pair by default out of the box. This would be very similar to the PerThread scope/context pair that Jersey already supports out of the box.

      Here is a request from the community to support this feature:

      http://stackoverflow.com/questions/20713086/what-corresponds-to-aseagersingleton-in-hk2-in-jersey-2/20721765#20721765

        Issue Links

          Activity

          Show
          Adam Lindenthal added a comment - https://github.com/jersey/jersey/pull/173
          Hide
          Adam Lindenthal added a comment -

          Merged, thanks for contributing!

          Show
          Adam Lindenthal added a comment - Merged, thanks for contributing!
          Hide
          Adam Lindenthal added a comment -

          That was actually meant for Jord - the author of the pull request on github. To you, John, thanks for reporting !

          Show
          Adam Lindenthal added a comment - That was actually meant for Jord - the author of the pull request on github. To you, John, thanks for reporting !
          Hide
          Stepan Vavra added a comment -

          We had to disable Immedate Scope HK2 feature due to several issues with ImmediateThreads (tracked as HK2-280). As a result, @Immediate services do not work by default anymore.

          Show
          Stepan Vavra added a comment - We had to disable Immedate Scope HK2 feature due to several issues with ImmediateThreads (tracked as HK2-280 ). As a result, @Immediate services do not work by default anymore.
          Hide
          Stepan Vavra added a comment -

          I just wanted to give it a quick shoot but without a success. With 2.4.0-b33, the problem still remains. Threads are left behind on application undeploy, and also jersey-client creation implies new thread for immediate services. I'm not saying though it won't be possible to do fine tuning and make it work in jersey by default. It will require more time than just an hour...

          Show
          Stepan Vavra added a comment - I just wanted to give it a quick shoot but without a success. With 2.4.0-b33, the problem still remains. Threads are left behind on application undeploy, and also jersey-client creation implies new thread for immediate services. I'm not saying though it won't be possible to do fine tuning and make it work in jersey by default. It will require more time than just an hour...

            People

            • Assignee:
              Unassigned
              Reporter:
              jwells
            • Votes:
              5 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour Original Estimate - 1 hour
                1h
                Remaining:
                Time Spent - 1 hour Remaining Estimate - 2 days
                2d
                Logged:
                Time Spent - 1 hour Remaining Estimate - 2 days
                1h