[ 
https://issues.apache.org/jira/browse/TUSCANY-3875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13049803#comment-13049803
 ] 

Greg Dritschler commented on TUSCANY-3875:
------------------------------------------

If SCAClientFactoryImpl.getService() is changed to always find the endpoint, it 
should pass that endpoint into the invocation handler so the handler doesn't 
have to call findEndpoint() again.

> SCAClientFactory.getService() doesn't throw NoSuchServiceException in a JVM 
> with no composites
> ----------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3875
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3875
>             Project: Tuscany
>          Issue Type: Bug
>            Reporter: Greg Dritschler
>            Priority: Minor
>
> 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?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to