日期:2014-05-20  浏览次数:20665 次

大神求助java中action接受大数据量
Map<String, Object> hashMap = new HashMap<String,Object>();
hashMap.put("v_SALESGCODE",paramOne);
hashMap.put("v_USERSEQ",paramTwo);
hashMap.put("v_DATE_FR", paramThree);
hashMap.put("v_DATE_TO", paramFour);
try{
clientChatManager.getSatisfProcedure(hashMap);

}
catch(Exception e){
e.printStackTrace();
}
List<ClientChat> list = (List<ClientChat> )hashMap.get("cv_1");
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
for (int i = 0; i <list.size(); i++) {
String str = df.format(list.get(i).getBaseDate());
list.get(i).setDateO(str);
}
调用存储过程,后两个参数是时间,如果paramThree,paramFour,参数传入时间间隔很小能接收到数据,但是如果是间隔很长后台也不发生错误控制台什么也打印不了就是接收不到数据,住存储过程这时候需要查询很长时间外加十几万条数据

------解决方案--------------------
这个主要看你的存储过程了,你返回的数据太多了,填入hashmap中就需要很长的时间,是否可虑分段返回数据呢?你数据量太大也容易导致内存溢出