WillemJiang commented on a change in pull request #728: [SCB-589] Consumer producer upgrade unordered URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/728#discussion_r191044580
########## File path: core/src/main/java/org/apache/servicecomb/core/provider/consumer/InvokerUtils.java ########## @@ -35,31 +33,37 @@ private static final Logger LOGGER = LoggerFactory.getLogger(InvokerUtils.class); public static Object syncInvoke(String microserviceName, String schemaId, String operationName, Object[] args) { - checkEngineStatus(); - ReferenceConfig referenceConfig = CseContext.getInstance().getConsumerProviderManager() - .getReferenceConfig(microserviceName); + ReferenceConfig referenceConfig = SCBEngine.getInstance().getReferenceConfigForInvoke(microserviceName); return syncInvoke(generateInvocation(schemaId, operationName, args, referenceConfig)); } public static Object syncInvoke(String microserviceName, String microserviceVersion, String transport, String schemaId, String operationName, Object[] args) { - checkEngineStatus(); - ReferenceConfig referenceConfig = CseContext.getInstance().getConsumerProviderManager() - .createReferenceConfig(microserviceName, microserviceVersion, transport); + ReferenceConfig referenceConfig = SCBEngine.getInstance() + .createReferenceConfigForInvoke(microserviceName, microserviceVersion, transport); return syncInvoke(generateInvocation(schemaId, operationName, args, referenceConfig)); } + /** + * it's a internal API, caller make sure already invoked SCBEngine.ensureStatusUp + * @param invocation + * @return + * @throws InvocationException + */ public static Object syncInvoke(Invocation invocation) throws InvocationException { - checkEngineStatus(); Response response = innerSyncInvoke(invocation); if (response.isSuccessed()) { return response.getResult(); } throw ExceptionFactory.convertConsumerException(response.getResult()); } + /** + * it's a internal API, caller make sure already invoked SCBEngine.ensureStatusUp + * @param invocation + * @return Review comment: It's better to specify the return response. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services