My web application is written using Spring MVC + Hibernate.
You don't need a service layer. However it helps you to
class Service {
private DatabaseBarRepo barRepo;
private DatabaseFooRepo fooRepo;
@Transactional
public void serviceRoutine() {
barRepo.doStuff();
fooRepo.doStuff();
}
}
Here we let two separate repositories take part in the same transaction. This is specific for databases albeit the principles are valid for other systems as well.