As a student, i read nearly all spring documentation. As far as i understood that spring is configuration monster. Annotation based or Xml based, it doesn't matter but what i really don't understand is what is the difference between transaction manager and entity manager.
If we have injected entityManager on Dao layer, why do we need transaction manager on service layer or vice versa. If we inject transaction manager(that wraps entitymanager) why do we need to inject entitymanager on DaoLayer. For JPARepositories, i don't even need to inject any manager. Spring does everything for me(i don't really understand mechanics). My another question is for JPARepositories Spring uses entityManager or transactionManager?