Abstract
is the processing of groups of elements. From an application standpoint, batch processing means reading data from a persistent store, doing something with the data, and then possibly storing the processed data in the persistent store as a single conceptual operation. Batch processing, which allows for the automation and sharing of computer resources, is usually run when computer resources are less busy.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
To be sure, this is not the only way to accomplish the application of discounts based on specific circumstances; a rules engine would work as well, and would probably be more appropriate than altering your actual data.
- 2.
This number is pulled out of a hat. It’s a good number and an excellent starting point, but if you really want to know what the best number of operations in a single transaction would be, you have to roll up your sleeves and test. Unfortunately, “best number of operations” is difficult to define in a general sense (outside of “does it work?”), so there’s no good way to demonstrate such a test.
- 3.
Hey, there’s that Hat of Generally Useful Numbers again!
- 4.
You can commit a transaction and start a new one to do a “batch operation” as well, but that would invalidate our (somewhat artificial) requirement to maintain a single transaction. In general, we’ve been closing the Session when committing transactions, mostly to explicitly clear the Session's first-level cache.
- 5.
What we’d prefer is that books with Hibernate in their titles get a $10 premium. But “discount” it is!
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2015 Joseph Ottinger
About this chapter
Cite this chapter
Ottinger, J., Guruzu, S., Mak, G. (2015). Batch Processing and Native SQL. In: Hibernate Recipes. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-0127-5_11
Download citation
DOI: https://doi.org/10.1007/978-1-4842-0127-5_11
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-0128-2
Online ISBN: 978-1-4842-0127-5
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)