-->
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: Options for Processing Large Batches
PostPosted: Fri Apr 21, 2006 5:06 am 
Newbie

Joined: Tue May 17, 2005 3:39 am
Posts: 3
Hi all,

I have a requirement like this.

I need to process a large set of jobs (millions) at the end of the month/year. I can batch these jobs into some fixed size, say 1000, and process each batch separately. Each job is independent of other jobs. Each job requires a complex set of activities to complete its processing. If one of the job fails, I should be able to either,

1. Rollback the transactions within the failed job, mark it as failed and proceed with the rest of the jobs in the batch and Commit. I shall work on the failed job later.

2. Commit whatever jobs has been processed succesfully till then, Rollback the failed job and mark it as failed. I shall re-process the rest of the jobs in that batch later.

I have a few options to do this.

1. Do the whole operation in one Transactional context. This is not desireable considering that there are chances of a few jobs failing in each batch, which will result in rollback of all previously successful jobs in that batch.

2. Commit the transaction after each job. (Not sure how to do this when managing transactions through Spring config with Hibernate) Also, I feel it may have a negative impact on performance, considering the volumes I need to process and complexity of each job.

3. Commit after processing some fixed number of jobs, say 100, in each batch. This can minimize the reprocessing to some extend. Again I am not sure how to do it while using declarative transactions.

4. Use Savepoints and Rollback to to the last Savepoint when a job fails. This might give better performance than Option#3. Not sure if this works in my environment.

5. Use Nested Transactions. I can independently manage transactions within each job and decide to Rollback if it fails, but still continue with the rest of the jobs. Not sure if this can be implemented at all.

Please let me know which is the best approach and how to do this given that we have Spring 1.2.7, Hibernate 3.1, Oracle 10g and Weblogic 8.15. We use Spring for managing transactions declaratively.

Thanks in Advance.

Best Regards,
Appu.


Last edited by appuchan on Sat Apr 22, 2006 2:50 am, edited 2 times in total.

Top
 Profile  
 
 Post subject: Any opinions on this?
PostPosted: Sat Apr 22, 2006 12:31 am 
Newbie

Joined: Tue May 17, 2005 3:39 am
Posts: 3
Any opinions on this?


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.