data « Batch « JPA Q&A





2. batch_versioned_data prevents StaleObjectStateException    forum.hibernate.org

Hibernate version: 2.1.6 I've been using optimistic concurrency control with separate sessions and automatic versioning (as per ref 10.4.2). When there is a version mis-match, I catch StaleObjectStateException and take the appropriate action in my application. So far so good. If I set hibernate.jdbc.batch_versioned_data to true in hibernate.properties, I no longer get a StaleObjectStateException, but a plain HibernateException. It comes from ...

3. Question:Why cann't I batch insert data?    forum.hibernate.org

Code between sessionFactory.openSession() and session.close(): Session session = sessionFactory.openSession() ; if (session == null) { throw new DBException("fail to connect db"); } int ilong,i; Transaction tx = null; SsmnCancelNum scancelnum = new SsmnCancelNum(); try { tx = session.beginTransaction(); ilong = lcancelnum.size(); for (i = 0; i < ilong; i++) { scancelnum = (SsmnCancelNum)lcancelnum.get(i); session.save(scancelnum); session.flush(); } tx.commit(); } catch (HibernateException he) ...

4. Batch processing with large data sets    forum.hibernate.org

Newbie Joined: Wed Aug 02, 2006 5:53 pm Posts: 4 Hello all, i have a question...:) I use hibernate 3.2 Example: I would like to perform a copy from table 1 ("InterfaceTable") to table 2 ("BaseTable"). On both tables i have defined business objects (with hibernate tools on eclipse, InterfaceObj and BaseObj). BaseObj possesses plausibility (validate) methods with which his attributes ...

6. Reading data in batch    forum.hibernate.org

Hi I m using hibernate to read from my database. NOw,I need to have a proprty file which will specify the size/batch in which data will b read from database and I have to read as per the value given in the property file. Can any one tell me how to do this Thnks in advance