-->
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.  [ 3 posts ] 
Author Message
 Post subject: Object save causes lockouts
PostPosted: Sun Jul 29, 2012 8:03 pm 
Newbie

Joined: Mon Jan 24, 2011 9:25 pm
Posts: 2
My database (SQL Server) contains a table structure that mimics a spreadsheet.

The parent table is a worksheet.

The child table is a row.

The grandchild table is a cell.

I have defined POJO objects to represent each table; the worksheet object contains a set of row objects, each row object contains a set of cell objects.

When my program saves a large worksheet object (e.g. > 1,000 rows), all other users are locked out of the application until the save completes (takes about 15-20 seconds per 1,000 row objects and the more cell objects, the longer it takes).

Rather than saving the worksheet object, would it be better to iterate over the row objects and commit after a number of row object saves? MAybe I should commit after saving each row object?

Is there another/better way to save this object structure?

Thanks in advance,

Steven.


Top
 Profile  
 
 Post subject: Re: Object save causes lockouts
PostPosted: Fri Aug 24, 2012 6:36 am 
Newbie

Joined: Thu Aug 09, 2012 1:59 am
Posts: 1
consider another user, who looks at your spreadhseet in that 20 second period while it is being saved. When you commit row by row, then such a user will only see the rows already committed, but won't see the other rows. If such a situation is acceptable, then committing row by row is recommended.


Top
 Profile  
 
 Post subject: Re: Object save causes lockouts
PostPosted: Fri Aug 24, 2012 2:37 pm 
Newbie

Joined: Wed Aug 22, 2012 11:52 pm
Posts: 4
1. What is your data selection criteria? Are reading only commited data?
2. One more point to add is the data integrity. If you save row by row then other users are able to see the data which not complete.
3. These kind of requirements are governed by business functions rather than technical boundaries


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.