Avni Server Coding Guidelines
Controller, Service, Entity, Value Object, Repository, Contract Object (request/response). These are pretty much as they have been described in domain driven design.
@Transaction attribute of spring should be used only on the controller and not on services. This is because for us each controller method makes the scope of one transaction.
For the background (spring batch jobs) jobs where the controller has not invoked the scope of the transaction should be discussed. A very large job should be broken up into smaller transactions and the job should be designed to be idempotent. These transactions can be controlled via a worker layer which is currently not formalized in the Avni server code.
Updated 5 months ago