-->
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: Batch and commit. Can i define batch?
PostPosted: Mon Nov 13, 2006 4:20 pm 
Beginner
Beginner

Joined: Thu Nov 02, 2006 2:23 pm
Posts: 33
Hey,

Lets assume a scenario like this:

Code:
WebService
for i=0 - > Events.size Do
EventDAO.save(Events[i]))


Code:
EventDAO  do:
session.open
sessions.save(event)
session.comit
session.close


can i define that hibernate will do "batching of statements" in order to have better performance?

Does it means that if i call to session.comit it commit all the batch of statements that he has?

I dont want to open the session in the WebService , because i want the DAO to handle this and i dont want that if saving of one event fails it will lost all the events.

How can i know what is the actions that was done in the DB side?(I mean that i want to know only sql that was runinig against the DB and not against cache or somethink like this)


Thank you very much.
Sorry for my English


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.