3 ms·
is database access only in service?
by nytgop77 6y ago
is database access only in service?
- exabrial 6y agoCorrect. A business logic controller can not directly corner the outside world, it must talk through a service. This is nice because it prevents leaky abstractions into the controller layer. Actions across services that need to be atomic can be grouped in an XA transaction: // Xa start databaseService.reset password(user); emailService.notifyPasswordChange(user); // Xa commit