We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
问题1:这里会出现死锁吧?? private synchronized void clearSessionData() { queryCacheOnCommit.clear(); updateStatementOnCommit.clear(); }
private synchronized void refreshCache() { cachingManager.refreshCacheKey(queryCacheOnCommit); // clear the related caches cachingManager.clearRelatedCaches(updateStatementOnCommit); clearSessionData(); }
问题2:并发问题 protected Object processUpdate(Invocation invocation) throws Throwable { Object result = invocation.proceed(); MappedStatement mappedStatement = (MappedStatement) invocation.getArgs()[0]; Map<String ,Object> map = new HashMap(); map.put("id",mappedStatement.getId()); map.put("parameterObject",invocation.getArgs()[1]); updateStatementOnCommit.add(map); return result; } private synchronized void clearSessionData() { queryCacheOnCommit.clear(); updateStatementOnCommit.clear(); } 第一个事务执行对updateStatementOnCommit 执行添加时,然后第二个事务执行截图二的方式,那第一个事务的updateStatementOnCommit 添加的值也给清除了。那这样就存在了问题吧???
The text was updated successfully, but these errors were encountered:
No branches or pull requests
问题1:这里会出现死锁吧??
private synchronized void clearSessionData() {
queryCacheOnCommit.clear();
updateStatementOnCommit.clear();
}
问题2:并发问题
protected Object processUpdate(Invocation invocation) throws Throwable {
Object result = invocation.proceed();
MappedStatement mappedStatement = (MappedStatement) invocation.getArgs()[0];
Map<String ,Object> map = new HashMap();
map.put("id",mappedStatement.getId());
map.put("parameterObject",invocation.getArgs()[1]);
updateStatementOnCommit.add(map);
return result;
}
private synchronized void clearSessionData() {
queryCacheOnCommit.clear();
updateStatementOnCommit.clear();
}
第一个事务执行对updateStatementOnCommit 执行添加时,然后第二个事务执行截图二的方式,那第一个事务的updateStatementOnCommit 添加的值也给清除了。那这样就存在了问题吧???
The text was updated successfully, but these errors were encountered: