liubao68 edited a comment on issue #2534:
URL:
https://github.com/apache/servicecomb-java-chassis/issues/2534#issuecomment-970087269
使用最新版本测试了下, 未能重现问题。 如果在 `onAfterRegistry` 之前调用服务, 会抛出异常(参考 SCBEngine.
ensureStatusUp()):
```
public void ensureStatusUp() {
SCBStatus currentStatus = getStatus();
if (!SCBStatus.UP.equals(currentStatus)) {
String message =
"The request is rejected. Cannot process the request due to STATUS
= " + currentStatus;
LOGGER.warn(message);
throw new InvocationException(Status.SERVICE_UNAVAILABLE, new
CommonExceptionData(message));
}
}
```
这个是一定程度上的保护机制。 然而还是要调整业务代码,保证接口调用发生在 AfterRegistry
之后,这个是使用java-chassis的一个约束条件。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]