Transactions, Spring.
class="x.y.service.EntityService"/> Finally, we can define a method in the service layer to add our business logic. public class EntityService { public Long registerEntity(Entity entity) { // execute some SQL statements like // inserting an entity into the db // and return the autogenerated id