This post is related to a presentation I gave (in Portuguese) for a Brazilian tech event called TDC (The Developer’s Conference) in 2012. The topic of this presentation was how to use AMQP in a Java application, using the RabbitMQ messaging system and Spring.
You can check the code in the GitHub.
In this post we’ll be talking about a subject that is little explored by most of the developers: Transaction attributes. When we’re creating a service (EJB, Spring..), we can either control the transaction manually (BMT – Bean Managed Transaction) or delegate this responsibility to the container (CMT – Container Managed Transaction). CMT is used in most of the cases and with declarative configuration and it’s for this type of configuration that the transaction attributes exist. They define, for example, if your method must or must not be invoked from within a transactional scope.
Just to make things easier and clearer, the term client in this post means the caller, that can be a standalone application, an EJB, a Spring Service, etc.
Continue reading “Understanding transaction attributes”