Tuscany
  1. Tuscany
  2. TUSCANY-3875

SCAClientFactory.getService() doesn't throw NoSuchServiceException in a JVM with no composites

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Java-SCA-2.x
    • Component/s: None
    • Labels:
      None

      Description

      If a JVM has no OASIS composites in a given domain, SCAClientFactoryImpl.findLocalRuntime() won't find an existing domain registry. It constructs a client domain registry and sets a flag "remoteClient" to true. This causes getService() to skip over the service lookup and to just return a proxy. When the client invokes the proxy, the invocation handler checks if the service exists in the client domain registry. If not, it throws NoSuchServiceException. Since this is a checked exception and it's not defined on the business interface, the client gets an UndeclaredThrowableException.

      If the JVM does have some running OASIS composites in the domain, getService() will check if it has the desired service and if not, throw a NoSuchServiceException as expected.

      This doesn't seem entirely consistent. In either case the service may show up later on some remote node. Why should the client behave differently depending on whether the local node itself has some unrelated OASIS components running in it at that moment?

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Greg Dritschler
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development