diecui1202 commented on a change in pull request #2517: issue#2516: Remove
getSpringContext() from org.apache.dubbo.config.spring.ServiceBean
URL: https://github.com/apache/incubator-dubbo/pull/2517#discussion_r218299178
##########
File path:
dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/status/DataSourceStatusChecker.java
##########
@@ -41,10 +41,18 @@
@Override
@SuppressWarnings("unchecked")
public Status check() {
- ApplicationContext context = ServiceBean.getSpringContext();
+ ApplicationContext context = null;
+ for (ApplicationContext c : SpringExtensionFactory.getContexts()) {
+ if (c != null) {
+ context = c;
+ break;
Review comment:
How to make sure this is the right context?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]