This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.1
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.1 by this push:
new a795ff73df Get system properties from context (#11082)
a795ff73df is described below
commit a795ff73dff7318c564a3d38a19be97b92ce496a
Author: huazhongming <[email protected]>
AuthorDate: Tue Dec 6 15:45:45 2022 +0800
Get system properties from context (#11082)
---
.../src/main/java/org/apache/dubbo/rpc/AsyncRpcResult.java | 3 +--
.../src/main/java/org/apache/dubbo/rpc/protocol/AbstractInvoker.java | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git
a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/AsyncRpcResult.java
b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/AsyncRpcResult.java
index 2e7dfd9d17..afd8d86837 100644
---
a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/AsyncRpcResult.java
+++
b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/AsyncRpcResult.java
@@ -20,7 +20,6 @@ import org.apache.dubbo.common.constants.CommonConstants;
import org.apache.dubbo.common.logger.ErrorTypeAwareLogger;
import org.apache.dubbo.common.logger.LoggerFactory;
import org.apache.dubbo.common.threadpool.ThreadlessExecutor;
-import org.apache.dubbo.rpc.model.ApplicationModel;
import org.apache.dubbo.rpc.model.ConsumerMethodModel;
import org.apache.dubbo.rpc.protocol.dubbo.FutureAdapter;
@@ -213,7 +212,7 @@ public class AsyncRpcResult implements Result {
});
// Whether set future to Thread Local when invocation mode is sync
- String setFutureWhenSync =
ApplicationModel.defaultModel().getModelEnvironment().getSystemConfiguration()
+ String setFutureWhenSync =
invocation.getModuleModel().getModelEnvironment().getSystemConfiguration()
.getString(CommonConstants.SET_FUTURE_IN_SYNC_MODE, "true");
if (Boolean.parseBoolean(setFutureWhenSync) || ((RpcInvocation)
invocation).getInvokeMode() != InvokeMode.SYNC) {
diff --git
a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/AbstractInvoker.java
b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/AbstractInvoker.java
index e8e5d28056..fe668d65b9 100644
---
a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/AbstractInvoker.java
+++
b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/AbstractInvoker.java
@@ -39,7 +39,6 @@ import org.apache.dubbo.rpc.Result;
import org.apache.dubbo.rpc.RpcContext;
import org.apache.dubbo.rpc.RpcException;
import org.apache.dubbo.rpc.RpcInvocation;
-import org.apache.dubbo.rpc.model.ApplicationModel;
import org.apache.dubbo.rpc.protocol.dubbo.FutureAdapter;
import org.apache.dubbo.rpc.support.RpcUtils;
@@ -239,7 +238,7 @@ public abstract class AbstractInvoker<T> implements
Invoker<T> {
}
// Whether set future to Thread Local when invocation mode is sync
- String setFutureWhenSync =
ApplicationModel.defaultModel().getModelEnvironment().getSystemConfiguration()
+ String setFutureWhenSync =
invocation.getModuleModel().getModelEnvironment().getSystemConfiguration()
.getString(CommonConstants.SET_FUTURE_IN_SYNC_MODE, "true");
if (Boolean.parseBoolean(setFutureWhenSync) ||
invocation.getInvokeMode() != InvokeMode.SYNC) {