plusmancn commented on issue #8605:
URL: https://github.com/apache/dubbo/issues/8605#issuecomment-909783875
> implementing an internal service creation process instead of creating from
serviceconfig
What's the benefit against the cost? The original purpose was only to
guarantee the safety of internal service, and moreover `ProtocolFilterWrapper`
have already implemented some feature which is similar to whitelist.
```java
// => org.apache.dubbo.rpc.cluster.filter.ProtocolFilterWrapper
@Override
public <T> Exporter<T> export(Invoker<T> invoker) throws RpcException {
// => Here, DON'T wrap with filter chain
if (UrlUtils.isRegistry(invoker.getUrl())) {
return protocol.export(invoker);
}
return protocol.export(builder.buildInvokerChain(invoker,
SERVICE_FILTER_KEY, CommonConstants.PROVIDER));
}
@Override
public <T> Invoker<T> refer(Class<T> type, URL url) throws RpcException {
if (UrlUtils.isRegistry(url)) {
return protocol.refer(type, url);
}
return builder.buildInvokerChain(protocol.refer(type, url),
REFERENCE_FILTER_KEY, CommonConstants.CONSUMER);
}
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]