Transaction Management Using Spring

Home » Transaction Management Using Spring » Random » Transaction Management Using Spring

In order to effectively design and implement software that handles transactions using Spring, knowledge on the concepts below is vital:

Isolation: the degree of isolation this transaction has from the work of other transactions. For example, can this transaction see uncommitted writes from other transactions?

Propagation: normally all code executed within a transaction scope will run in that transaction. However, there are several options specifying behavior if a transactional method is executed when a transaction context already exists: for example, simply continue running in the existing transaction (the common case); or suspending the existing transaction and creating a new transaction. Spring offers all of the transaction propagation options familiar from EJB CMT.

Timeout: how long this transaction may run before timing out (and automatically being rolled back by the underlying transaction infrastructure).

Read-only status: a read-only transaction does not modify any data. Read-only transactions can be a useful optimization in some cases (such as when using Hibernate).

References:

[1] http://static.springsource.org/spring/docs/2.0.x/reference/transaction.html

Leave a Comment