我试图将Quartz Sequential执行更改为并行执行.
它工作正常,性能明智,看起来不错,但Spawned(已创建)线程不会被破坏.
它仍处于Runnable国家; 为什么以及如何解决这个问题?请指导我.
代码在这里:
@Override
protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
logger.error("Result Processing executed");
List<Object[]> lstOfExams = examService.getExamEntriesForProcessingResults();
String timeZone = messageService.getMessage("org.default_timezone", null, Locale.getDefault());
if(lstOfExams!=null&&!lstOfExams.isEmpty()){
ThreadPoolTaskExecutor threadPoolExecuter = new ThreadPoolTaskExecutor();
threadPoolExecuter.setCorePoolSize(lstOfExams.size());
threadPoolExecuter.setMaxPoolSize(lstOfExams.size()+1);
threadPoolExecuter.setBeanName("ThreadPoolTaskExecutor");
threadPoolExecuter.setQueueCapacity(100);
threadPoolExecuter.setThreadNamePrefix("ThreadForUpdateExamResult");
threadPoolExecuter.initialize();
for(Object[] obj : lstOfExams){
if(StringUtils.isNotBlank((String)obj[2]) ){
timeZone = obj[2].toString();
}
try {
Userexams userexams=examService.findUserExamById(Long.valueOf(obj[0].toString()));
if(userexams.getExamresult()==null){
UpdateUserExamDataThread task=new UpdateUserExamDataThread(obj,timeZone);
threadPoolExecuter.submit(task);
}
// testEvaluator.generateTestResultAsPerEvaluator(Long.valueOf(obj[0].toString()), obj[4].toString(), obj[3]==null?null:obj[3].toString(),timeZone ,obj[5].toString() ,obj[1].toString());
// logger.error("Percentage Marks:::::"+result.getPercentageCatScore());
} catch (Exception e) {
Log.error("Exception at ResultProcessingJob extends QuartzJobBean …Run Code Online (Sandbox Code Playgroud) 调试时出现异常
Failed to connect to remote VM. Connection refused.
Connection refused: connect.
Run Code Online (Sandbox Code Playgroud)
我已经在Windows系统中尝试过命令
netstat -n -a -p tcp
但是我的8787端口没有启动该端口的方法。
嗨,我的代码中刚刚经历了一个神秘的情况。single<td>或<th>在 chrome 和 Mozilla Firefox 中不知道为什么。
<div class="right_content">
<table style="width: 100%; height: 200px; margin-top: 5px;" id="mainTable">
<tr>
<th colspan="1">Participant Name</th>
<td colspan="1">${fullName}<td>
<th colspan="1">Role</th>
<td colspan="1">${role}<td>
<th colspan="1">Brand/Location</th>
<td colspan="1">${location}<td>
</tr>
<tr>
<th>Goal Text</th>
<td><input name="goalText" id="goalText" name="goalText"
class="text_field" size="40" maxlength="95" tabindex="1"
title="Minimum Rating For This Competency" /></td>
<th>Assessment Center</th>
<td><select name="assessmentCenterId" id="assessmentCenterId" class="text_field"
tabindex="2" title="Select Assessment Center">
<option value="-1">--Select Assessment Center--</option>
<c:forEach items="${acList}" var="singleAC" varStatus="sts">
<c:choose>
<c:when test="${singleAC.id eq 0}">
<option value="${singleAC.id}" selected="selected">${singleAC.name} </option>
</c:when> …Run Code Online (Sandbox Code Playgroud)