-
Notifications
You must be signed in to change notification settings - Fork 0
guide transactions
Transactions are technically processed by the data access layer. However, the transaction control has to be performed in upper layers. To avoid dependencies on persistence layer and technical code in upper layers, we use AOP to add transaction control via annotations as aspect.
As we recommend using spring, we use the @Transactional
annotation (for a JEE application server you would use @TransactionAttribute
instead). We use this annotation in the logic layer to annotate business methods that participate in transactions (what typically applies to all business components).
@Transactional
public class MyExampleLogicImpl {
public MyDataTo getData(MyCriteriaTo criteria) {
...
}
...
}
Transaction control for batches is a lot more complicated and is described in the batch layer.
This documentation is licensed under the Creative Commons License (Attribution-NoDerivatives 4.0 International).