-
Notifications
You must be signed in to change notification settings - Fork 26.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dubbo-2013 #2114
Dubbo-2013 #2114
Changes from 14 commits
6b0bd1a
cd8e97d
20644bc
06a0ca4
a4793ba
a0bc50d
a93a5db
e8e2a2d
31a9164
967c739
6796da2
7e70a68
1316623
58980c3
889060b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,9 +23,7 @@ | |
import org.apache.dubbo.common.logger.Logger; | ||
import org.apache.dubbo.common.logger.LoggerFactory; | ||
import org.apache.dubbo.common.store.DataStore; | ||
import org.apache.dubbo.common.utils.ExecutorUtil; | ||
import org.apache.dubbo.common.utils.NamedThreadFactory; | ||
import org.apache.dubbo.common.utils.NetUtils; | ||
import org.apache.dubbo.common.utils.*; | ||
import org.apache.dubbo.remoting.Channel; | ||
import org.apache.dubbo.remoting.ChannelHandler; | ||
import org.apache.dubbo.remoting.Client; | ||
|
@@ -113,7 +111,12 @@ public AbstractClient(URL url, ChannelHandler handler) throws RemotingException | |
|
||
protected static ChannelHandler wrapChannelHandler(URL url, ChannelHandler handler) { | ||
url = ExecutorUtil.setThreadName(url, CLIENT_THREAD_POOL_NAME); | ||
url = url.addParameterIfAbsent(Constants.THREADPOOL_KEY, Constants.DEFAULT_CLIENT_THREADPOOL); | ||
String key = Constants.DEFAULT_KEY + Constants.HIDE_KEY_PREFIX + Constants.THREADPOOL_KEY; | ||
String threadpool = url.getParameter(key); | ||
if (StringUtils.isNotEmpty(threadpool)) { | ||
url = url.removeParameter(key); | ||
} | ||
url = url.addParameterIfAbsent(Constants.THREADPOOL_KEY, StringUtils.isNotEmpty(threadpool) ? threadpool : Constants.DEFAULT_CLIENT_THREADPOOL); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to change the code here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @chickenlj Ok, because I found that when ReferenceConfig integrate the configuration of ConsumerConfig, it will add the prefix "default.", so the "threadpool" property of <dubbo:consumer ../> will change to "default.thread" parameter in the URL. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Look at the |
||
return ChannelHandlers.wrap(handler, url); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may also need the following two parameters:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And remember to add the same content to the compatible copy:
https://github.com/apache/incubator-dubbo/blob/master/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/compat/dubbo.xsd