• Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: Java-SCA-2.0
    • Fix Version/s: Java-SCA-2.0
    • Component/s: None
    • Labels:
    • Patch Info:
      Patch Available


      SCAClientFactoryImpl calls the EndpointFinder to find a matching endpoint. If the endpoint returned by EndpointFinder is local to the same JVM, SCAClientFactoryImpl then calls RuntimeComponentImpl.getServiceReference() which calls ComponentContextImpl.createSelfReference(). If the client's URI does not include a binding name, ComponentContextImpl picks the first binding. This supercedes whatever selection was made by the EndpointFinder.

      I am attaching a patch that fixes the issue. It constructs a full URI based on the selection made by the EndpointFinder and passes that to RuntimeComponentImpl.getServiceReference().

      This exposed another issue. The scaclient-api itest tests that a getService() using component name only is rejected with a ServiceRuntimeException if the target component implements multiple services. This is because it is ambiguous which service is desired (SCAClientFactoryImpl does not do interface matching). This was being enforced in ComponentContextImpl, but with the above fix that isn't possible since it now gets a fully-specified URI. In order to fix this, I added a check into DefaultEndpointFinder.

      1. TUSCANY-4027.patch
        4 kB
        Greg Dritschler


        Simon Laws made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s Java-SCA-2.0 [ 12315542 ]
        Resolution Fixed [ 1 ]
        Simon Laws made changes -
        Assignee Simon Laws [ simonslaws ]
        Greg Dritschler made changes -
        Field Original Value New Value
        Attachment TUSCANY-4027.patch [ 12517960 ]
        Greg Dritschler created issue -


          • Assignee:
            Simon Laws
            Greg Dritschler
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: