Home » spring » Spring Transaction Management

Spring Transaction Management

Provides a consistent abstraction for transaction management. This abstraction is one of the most important of Spring’s abstractions wethout transaction data definition language operation is not perform, and delivers the following benefits:

1 Provides a consistent programming model across different ORM Database Layer and JDO.
2 Provides a simpler, easier to use, API for programmatic transaction transaction APIs
3 Integrates with the Spring data access abstraction
4 Supports Spring declarative transaction management

Transaction strategies

The key to the Spring transaction abstraction is the notion of a transaction strategy.
This is in org.springframework.transaction.PlatformTransactionManager interface Methods are available in transaction are

1 beginTransaction().
2 commitTransaction().
3 rolleBack().
4 setTimeout().

And these methods show TransactionException

every transaction follows ACID property

1 A atomicity.
2 C compatibility.
3 I isolation.
4 D dueribility.

We are using hibernate supported transaction management we put following code in beans in spring

The default transactions strategies are apply are as follows:

• Exception Handling: RuntimeExceptions roll-back, normal (checked) Exceptions don’t
• Transactions are read/write
• Isolation Level: TransactionDefinition.ISOLATION_DEFAULT
• Timeout: TransactionDefinition.TIMEOUT_DEFAULT

Managed by MochaHost - Fast & Easy WordPress Hosting