Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-3875

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • Java-SCA-2.x
    • None
    • 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?

      Attachments

        Activity

          People

            Unassigned Unassigned
            gregdritschler Greg Dritschler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: