日期:2014-05-18  浏览次数:20708 次

java网站,关于jdbc连接池的问题报错,紧急,请大神指点!!!解决不了又要被老板骂了。
[align=center]项目启动后按F5一直刷新网站主页,
1.刚开始刷新后异常的信息为:java.sql.SQLException: We are already in the process of making 11 connections and the number of simultaneous builds has been throttled to 10
 
2.刷新一段时候后异常的信息为:java.sql.SQLException: Couldn't get connection because we are at maximum connection count (200/200) and there are none 
 
3.最后报内存溢出异常。[/align]
代码我检查了没问题,pst,rs,conn该关闭的都关闭了,访问主页的19个查询方法也是平级的概念。

@RequestMapping(value = { "indexInfo" }, method = { RequestMethod.GET,
 RequestMethod.POST })
 public ModelAndView indexInfo(HttpServletRequest request,
 HttpServletResponse response, HttpSession session, ModelMap modelMap)
 throws Exception {
  
 List<Map<String, Object>> maps = browseByPicNewsType(7);
 
StringBuffer sb = new StringBuffer();
 StringBuffer sb1 = new StringBuffer();
 StringBuffer sb2 = new StringBuffer();
 for (Map<String, Object> map : maps) {
 sb.append("../");
 sb.append(map.get("IMAGEPATH"));
 sb.append("|");
 
sb1.append("../news_pic/picInfo.do?id=");
 sb1.append(map.get("ID"));
 sb1.append("|");
 
sb2.append(map.get("TITLE"));
 sb2.append("|");
 }
 
modelMap.put("news_pic_imgpath", sb.substring(0, sb.length() - 1));
 modelMap.put("news_pic_url", sb1.substring(0, sb1.length() - 1));
 modelMap.put("news_pic_title", sb2.substring(0, sb2.length() - 1));
 
objList = new ArrayList();
 HashMap optionMap = new HashMap();
 optionMap.put("value", "content");
 optionMap.put("text", "文章");
objList.add(optionMap);
 
optionMap = new HashMap();
 optionMap.put("value", "pics");
 optionMap.put("text", "图片");
objList.add(optionMap);
 
// 经信动态
List<Map<String, Object>> jingxindongtai = getAdminService()
 .select(
 " jxw_news",
 "Id, title, content,newType,userName,hints, issueDate,createdate",
 "newType=9 order by createdate desc limit 0,9");
 modelMap.put("jingxindongtai", jingxindongtai);
 
// 领导讲话
List<Map<String, Object>> lingdaojianghua = getAdminService()