-->
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.  [ 2 posts ] 
Author Message
 Post subject: select records while performing batch insert
PostPosted: Thu Feb 07, 2013 6:57 am 
Newbie

Joined: Thu Aug 20, 2009 4:22 am
Posts: 7
I have DAO's created for all my entities in java.

I am doing batch insert of around 10,000 records (cats).

I'm flushing the session every 50 records.

While the batch inserting is happening I want to be able to do a select all cats in the cats table so I can see progress, or at the very least I get no records returned.

At the moment though, when I do page refresh of the view all cats page (the query is essentially 'select catName from cats') the page hangs waiting for the batch insert to complete before it reads the records.

Is this normal expected behavior or is there something I can do that will allow my select to work during the batch insert process?

Regards


Top
 Profile  
 
 Post subject: Re: select records while performing batch insert
PostPosted: Wed Feb 13, 2013 10:35 am 
Beginner
Beginner

Joined: Wed Feb 06, 2013 2:43 am
Posts: 46
This is the normal behaviour.

Even if you do session.flush during the save .It will not show your results.
Flush will write all the chanegs after the save transaction is completed.

_________________
Thanks,
Ajit Singh
ajits@mindfiresolutions.com
www.mindfiresolutions.com


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

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.