-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: PreparedStatement Hibernate Log message
PostPosted: Mon Apr 11, 2005 1:22 pm 
Beginner
Beginner

Joined: Wed Nov 24, 2004 10:54 am
Posts: 48
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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.