I am seeing the following message in my Hibernate log
Code:
11 Apr 2005 11:16:32,731 DEBUG TP-Processor2 net.sf.hibernate.impl.BatcherImpl - about to open: 217 open PreparedStatements, -9 open ResultSets
Am I really about to open 217 prepared statements? Is it possible that it is seeing my detached objects that have been changed? Here is my code
Code:
Calendar rightNow = Calendar.getInstance();
java.sql.Date sqlToday = new java.sql.Date(rightNow.getTimeInMillis());
PailogBean pailogBean = new PailogBean();
PaiuserBean paiuserBean = getUser(request);
pailogBean.setDatetime(sqlToday);
pailogBean.setDept(dept);
pailogBean.setMedrec(getMedicalRecordNo(request));
pailogBean.setUserID(paiuserBean.getUserid());
pailogBean.setSpec(spec);
PailogComposite pailogComposite = new PailogComposite();
pailogComposite.setDatetime(sqlToday);
pailogComposite.setUserID(paiuserBean.getUserid());
pailogBean.setPailogKey(pailogComposite);
sess.save(pailogBean);
sess.flush();
This application is a "view" only app. This is the only item that actually does any king of writing to the database. The previous session just does a find on the objects. I will sometimes change a property inside that ORM object to indicate that that object has been seen by the user, however, this nothing I want to write back to the database. I do a session.close after each find, so I can not see that as the problem. Any ideas?