Uploaded image for project: 'CXF Distributed OSGi (Retired)'
  1. CXF Distributed OSGi (Retired)
  2. DOSGI-137

Possible bug in TopologyManagerImport when checking if an Endpoint is already imported

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3.1
    • 1.4.0
    • None
    • None
    • Unknown

    Description

      In TopologyManagerImport.importServices we seem to check if we already imported an endpoint. (See snippet below).


      private void importServices(String filter) {
      List<ImportRegistration> importRegistrations = getImportedServices(filter);
      for (EndpointDescription epd : importPossibilities.get(filter)) {
      if (!importRegistrations.contains(epd)) {


      I have two concerns with this:

      1. importRegistrations is a List<ImportRegistration> but we check using contains(epd) which is an EndpointDescription. I think this can never return true.

      I have prepared a code that can fix this:
      private boolean alreadyImported(EndpointDescription epd, List<ImportRegistration> importRegistrations) {
      for (ImportRegistration ir : importRegistrations) {
      if (epd.equals(ir.getImportReference().getImportedEndpoint()))

      { return true; }

      }
      return false;
      }
      As soon as I fix it though the second concern below may be an issue.

      2. We only have one list of ImportRegistrations. In case a RemoteServiceAdmin is added this means that we would not add it to this new RemoteServiceAdmin. So the question here is: Do we want to import each service with each RSA or only with one?

      So any ideas how to proceed here?

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: