Unit of Work Pattern
Learn Unit of Work Pattern (Data Access Patterns, Enterprise Design Patterns) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
What is the Unit of Work Pattern? A Unit of Work keeps track of everything you do during a business transaction - every object created, updated, or deleted - and then coordinates writing all of it out as one atomic operation at the end, instead of firing off a database call for every single change immediately. • Batches changes together for one commit, instead of many small round-trips. • Lets you roll back the entire set of changes together if anything fails.