View RSS Feed

Transaction

Spring Transactions

  1. Using Annotations for Transactions in Spring

    by , 11-27-2011 at 10:38 PM
    In the previous tip, I showed you how you could use XML to define a transaction. In this tip we will look at doing the same using annotations. It is blindly simple to use annotations for transactions. The tx namespace provides the <tx:annotation-driven> element. It appears like this :

    Java Code:
    <tx:annotation-driven transaction-manager="txManager" />
    With this you can now define transaction rules very easily. This tag tells Spring to examine all beans in ...
  2. Configuring Transactions in XML with Spring

    by , 11-27-2011 at 10:33 PM
    Continuing from my previous post, I will demonstrate how you can declare transactions in XML using Spring. Continuing from the previous tips on transaction attributes, letís dive straight in. Spring has a tx configuration namespace to simply declaring transactions in Spring. It is recommended that you include the aop namespace as well since some of the declarative transaction configuration elements use AOP configuration elements. The following shows how <tx:advice> is used for the Car service. ...

    Updated 11-27-2011 at 10:36 PM by Spring Framework

    Categories
    Configuration , Transaction , XML , Spring 3
    Attached Thumbnails Attached Images  
  3. Transaction Propagation Strategies in Spring

    by , 11-27-2011 at 10:29 PM
    In the previous tip, we looked at the key properties that are required for handling any transaction. In Spring, when you want to have your application are using. Spring transaction concepts are taken from the JEE specification specifically the EJB 3.0 specification. Another key aspect of managing transactions is the ability to control the propagation of transactions in your application. Spring has the org.springframework.transaction.TransactionStatus interface that allows an application to check ...
  4. Key Attributes of Spring Transactions

    by , 11-27-2011 at 10:25 PM
    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 ...

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

    Categories
    Transaction