EarthChen commented on code in PR #12199:
URL: https://github.com/apache/dubbo/pull/12199#discussion_r1178556881
##########
dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/TripleInvoker.java:
##########
@@ -260,7 +265,10 @@ RequestMetadata createRequest(MethodDescriptor
methodDescriptor, Invocation invo
if (methodDescriptor instanceof PackableMethod) {
meta.packableMethod = (PackableMethod) methodDescriptor;
} else {
- meta.packableMethod =
ReflectionPackableMethod.init(methodDescriptor, url);
+ final String contentType = APPLICATION_GRPC + "+" +
UrlUtils.serializationOrDefault(url);
Review Comment:
Do not dynamically concatenate content types for now
##########
dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/ReflectionAbstractServerCall.java:
##########
@@ -185,7 +191,10 @@ private void trySetMethodDescriptor(byte[] data) throws
IOException {
+ serviceDescriptor.getInterfaceName()), null);
return;
}
- packableMethod = ReflectionPackableMethod.init(methodDescriptor,
invoker.getUrl());
+ final URL url = invoker.getUrl();
+ packableMethod =
frameworkModel.getExtensionLoader(PackableMethodFactory.class)
+
.getExtension(ConfigurationUtils.getGlobalConfiguration(frameworkModel.defaultApplication()).getString(DUBBO_PACKABLE_METHOD_FACTORY,
DEFAULT_KEY))
Review Comment:
same
##########
dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/ReflectionAbstractServerCall.java:
##########
@@ -116,7 +120,10 @@ public void startCall() {
}
}
if (methodDescriptor != null) {
- packableMethod = ReflectionPackableMethod.init(methodDescriptor,
invoker.getUrl());
+ final URL url = invoker.getUrl();
+ packableMethod =
frameworkModel.getExtensionLoader(PackableMethodFactory.class)
+
.getExtension(ConfigurationUtils.getGlobalConfiguration(frameworkModel.defaultApplication()).getString(DUBBO_PACKABLE_METHOD_FACTORY,
DEFAULT_KEY))
Review Comment:
If it's an app model, it's still going to be in the url
--
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]