View RSS Feed

Spring Framework

Key Attributes of Spring Transactions

Rate this Entry
by , 11-27-2011 at 10:25 PM (1161 Views)
Transactions are defined as doing a business unit of work. It is a key functionality that enable you to control concurrent access of data by multiple business operations. This is done in order to safeguard integrity and ensure that data remains in a consistent state. If for any reason the unit of work could not be completed as an indivisible unit of work, all the changes are unwound and the system is returned to its previous state. The key properties for the design of any application is to ensure that these properties are well implemented in your transactions.

Name:  transactions_properties.jpg
Views: 176
Size:  50.1 KB

These concepts of transactions are known as ACID: Atomicity, Consistency, Isolation, and Durability.
To give you an idea of what this would look like in your application, below is some pseudo code that is consistent with these properties:
  • Begin transaction
  • Deduct inventory (sql write)
  • Debit client bank account (sql write)
  • Credit business funds (sql write)
  • Update transaction log (sql write)
  • Commit transaction


In a future tip, I will look more depth at how you can use this in Spring with your application server.

Submit "Key Attributes of Spring Transactions" to Facebook Submit "Key Attributes of Spring Transactions" to Digg Submit "Key Attributes of Spring Transactions" to del.icio.us Submit "Key Attributes of Spring Transactions" to StumbleUpon Submit "Key Attributes of Spring Transactions" to Google

Updated 11-30-2011 at 01:06 PM by Spring Framework

Categories
Transaction

Comments