Uploaded image for project: 'CXF Distributed OSGi'
  1. CXF Distributed OSGi
  2. DOSGI-221

HttpServiceManager.getHttpService sometimes return null

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.0
    • Fix Version/s: 1.8.0
    • Component/s: common
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Mail from fabianocoliveira@gmail.com


      I would like of your help.

      Im using CXF DOSGi in my project but I found a problem. This problem is not
      in CXF but I think that some changes in CXF DOSGi
      could help me.

      Im using Spring DM to manage dependencies. I only register a service when
      org.osgi.service.http.HttpService is satisfied.

      When TopologyManagerExport receive events to register and export my remote
      interface (soap or rest) I can get a null
      from HttpServiceManager.getHttpService(). Because I have 3 threads (1
      firing events of registered HttpService, 1 Running Applicaction context
      initialization (Spring DM) and the TopologyManagerExport thread resposable
      to export DOSGi interfaces)

      In this case I think that we coul use the code below to resolve this in
      HttpServiceManager:
      protected HttpService getHttpService() {
      Object service = null;
      try

      { service = tracker.waitForService(120000); }

      catch (InterruptedException ex)

      { LOG.warn("waitForService interrupeted", ex); }

      if (service == null)

      { throw new RuntimeException("No HTTPService found"); }

      return (HttpService) service;
      }

      What do you think ?

        Attachments

          Activity

            People

            • Assignee:
              cschneider Christian Schneider
              Reporter:
              cschneider Christian Schneider
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: