top-image

Tag archives for transaction

Spring: Transaction visibility / proxy / propagation REQUIRED and REQUIRES_NEW
Hi, After my post Spring: Transaction propagation / readOnly on the propagation and readonly attribute, I would write some words concerning the propagation and the visibility of annoted method because I was victim to not having read up on how Spring proxies work, the ones responsible for annotation-based transaction support. So I will expose some problem via examples of how Spring proxies ...more»
Spring: Transaction propagation / readOnly
Hello, I would expose a simple post with 2 examples concerning the propagation of a transaction in the application layers (Spring MVC controller, Manager layer, Service Layer, DAO layer) with the use of Propagation.REQUIRED and the readOnly attribute in the @Transactionnal annotation like: See the official Spring documentation concerning the propagation. TEST n°1: In this 1st test, we will study a simple example with ...more»
Spring: Transaction management with checked, unchecked exceptions
Often, developers forgotten the transactional behaviour of proxies Spring: - by default, the transaction is rollbacked only in the case of runtime, unchecked exceptions (an instance or subclass of RuntimeException) and for Errors; - the transaction is not rollbacked if a checked exception is thrown from a transactional method. A good practice is to create 2 types of checked exceptions extending Exception: - ...more»
bottom-img
Copyright ® 2012 Huseyin Ozveren. No reproduction, even partial, can be used from this site and all its contents including text, documents, images, etc.. without the express permission of the author.