I have not seen this topic discussed in much detail so thought I'd ask for help before we abandon queryDSL and return to JPA criteria objects. We are observing stuck threads immediately in a clustered WebLogic container when deploying our application EAR file with queryDSL. I pasted an example of our usage pattern that is causing the issues. From our perspective it looks fine but it causes threading issues consistently. Any insight on what we need to do to fix the threading issues would be greatly appreciated? I can't find much information on the subject in the documentation or this group discussion.
public class ClaimAssignmentTileResultHandler extends AbstractResultHandler<ClaimAssignmentTileRequest, AssignmentResult> {
@Override
public AssignmentResult getResult(ClaimAssignmentTileRequest claimAssignmentTileRequest) {
// create the reference date for our calculations
LocalDate now = LocalDate.now();
// create the result object
AssignmentResult assignmentResult = new AssignmentResult();
// create and execute query for auto assigned claims
QClaimAssignmentFact autoAssigned = new QClaimAssignmentFact("claimAssignmentFact");
BooleanExpression assignmentType = autoAssigned.assignmentType.type.eq(ClaimAssignmentTileRequest.AUTO);
BooleanExpression factDate = createDateBooleanExpression(autoAssigned.factDate, now);
JPAQuery query = getJpaQuery().from(autoAssigned).where(assignmentType, factDate);
assignmentResult.setTodayCount(Metric.AUTO_ASSIGNED, query.singleResult(autoAssigned.claim.count()));
// create and execute query for returned claims
QClaimAssignmentFact recalled = new QClaimAssignmentFact("claimAssignmentFact");
assignmentType = recalled.assignmentType.type.eq(ClaimAssignmentTileRequest.RECALL);
factDate = createDateBooleanExpression(recalled.factDate, now);
query = getJpaQuery().from(recalled).where(assignmentType, factDate);
assignmentResult.setTodayCount(Metric.RETURNED, query.singleResult(recalled.claim.count()));
// return result
return assignmentResult;
}
}