[ http://issues.apache.org/jira/browse/TUSCANY-169?page=comments#action_12377899 ]
Jean-Sebastien Delfino commented on TUSCANY-169: ------------------------------------------------ Jim, do you have a fix for this one? Thanks. > Incorrect ServiceUnavailable exception thrown by locateService > -------------------------------------------------------------- > > Key: TUSCANY-169 > URL: http://issues.apache.org/jira/browse/TUSCANY-169 > Project: Tuscany > Type: Bug > Components: Java SCA Core > Versions: M1 > Reporter: Jean-Sebastien Delfino > Assignee: Jim Marino > Fix For: M1 > > ModuleContext.locateService(serviceName) throws a ServiceUnavailableException > if serviceName cannot be found. This is not correct, > ServiceUnavailableException is described like this in the SCA 0.9 spec: > ServiceUnavailableException - signals problems in the interaction with remote > services. This > extends ServiceRuntimeException. These are exceptions that may be transient, > so retrying is > appropriate. Any exception that is a ServiceRuntimeException that is not a > ServiceUnavailableException is unlikely to be resolved by retrying the > operation, since it most likely > requires human intervention. > To reproduce the problem. just change the name passed to locateService in the > HelloWorldClient sample. You'll get the following exception: > Exception in thread "main" > org.apache.tuscany.core.context.ServiceNotFoundException: > HelloWorldServiceComponent2 > at > org.apache.tuscany.core.context.impl.CompositeContextImpl.locateService(CompositeContextImpl.java:102) > at > org.apache.tuscany.samples.helloworld.HelloWorldClient.main(HelloWorldClient.java:52) > A ServiceRuntimeException should be thrown instead of > ServiceUnavailableException. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
