Uploaded image for project: 'REST Client'
  1. REST Client
  2. MGNLRESTCL-151

Refactor rest-client-module

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Neutral
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2.0.1
    • Component/s: None
    • Labels:
      None
    • Release notes required:
      Yes
    • Documentation update required:
      Yes
    • Sprint:
      6.2.1 Ramp-up 21, 6.2.1 Ramp-up 22
    • Story Points:
      8

      Description

      2020-03-13 16:27:56,865 TRACE class org.ehcache.core.Ehcache-REST_CLIENT_CACHE : Initializing
      2020-03-13 16:27:56,866 DEBUG class org.ehcache.core.Ehcache-REST_CLIENT_CACHE : Initialize successful.
      2020-03-13 16:29:20,378 WARN org.jboss.resteasy.resteasy_jaxrs.i18n : RESTEASY002160: Provider instance info.magnolia.rest.client.app.ui.debug.DebugFilter is already registered. 2nd registration is being ignored.
      2020-03-13 16:37:48,575 WARN org.jboss.resteasy.client.jaxrs.i18n : RESTEASY004687: Closing a class org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient43Engine instance for you. Please close clients yourself.
      2020-03-13 16:37:48,576 WARN org.jboss.resteasy.client.jaxrs.i18n : RESTEASY004687: Closing a class org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient43Engine instance for you. Please close clients yourself.

       

      info.magnolia.rest.client.app.ui.debug.DebugFilter is already registered. 2nd registration is being ignored.

      After discussed with Dai Ha, this log entry could be ignored since it causes no harm.

       

      Criteria:

      • Refactor RestClient, RestClientFactory:
        • Do not expose Client, WebTarget to user
        • Client should be closed after used via RestClient's api
        • All cached Client should be closed when module is stopped
        • Custom Filter could be register on demand via RestClient's api
      • Using RestClient:
        • Share RestClient should be cached and handled by RestClientProvider
        • RestClient which is not cached should be closed right after used
      • Register custom filter on demand
        • RestClient allows to register/unregister custom filter without expose jaxrs Client or WebTarget

       

       

        Checklists

        Acceptance criteria

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                thien.quach Quach Hao Thien
                Reporter:
                jfranco Jorge Franco
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Date of First Response:

                    Checklists

                    DoD

                      Time Tracking

                      Estimated:
                      Original Estimate - Not Specified
                      Not Specified
                      Remaining:
                      Remaining Estimate - 0d
                      0d
                      Logged:
                      Time Spent - 11d 1h 10m
                      11d 1h 10m