|
|
|
@@ -283,10 +283,12 @@ public class WechatCalllbackController extends BaseController { |
|
|
|
return; |
|
|
|
} |
|
|
|
} else { |
|
|
|
getThreadCount( 0 ); |
|
|
|
// 公众号 |
|
|
|
WxMpService mpService = openService.getWxOpenComponentService().getWxMpServiceByAppid(appId); |
|
|
|
try { |
|
|
|
WxMpXmlOutMessage outMessage = mpManager.getRouter(mpService).route(inMessage); |
|
|
|
getThreadCount( 1 ); |
|
|
|
if (outMessage == null) { |
|
|
|
this.logger.info("2 return: success"); |
|
|
|
printWriter.print("success"); |
|
|
|
@@ -307,6 +309,24 @@ public class WechatCalllbackController extends BaseController { |
|
|
|
printWriter.close(); |
|
|
|
} |
|
|
|
|
|
|
|
private void getThreadCount( int i) { |
|
|
|
ThreadGroup group = Thread.currentThread().getThreadGroup(); |
|
|
|
ThreadGroup topGroup = group; |
|
|
|
// 遍历线程组树,获取根线程组 |
|
|
|
while (group != null) { |
|
|
|
topGroup = group; |
|
|
|
group = group.getParent(); |
|
|
|
} |
|
|
|
// 激活的线程数加倍 |
|
|
|
int estimatedSize = topGroup.activeCount() * 2; |
|
|
|
Thread[] slackList = new Thread[estimatedSize]; |
|
|
|
// 获取根线程组的所有线程 |
|
|
|
int actualSize = topGroup.enumerate(slackList); |
|
|
|
// copy into a list that is the exact size |
|
|
|
logger.info("Thread list size == " + i + " : " + actualSize); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
private void updateAuditStatus(String appId, boolean success, String reason) { |
|
|
|
|
|
|
|
|
|
|
|
|