HiAll, I was confused by the EclipseLink for Tomcat documentation saying:
Limitations to JPA: No @PersistenceContext injection of a container managed persistence unit is available - use Persistence.createEntityManagerFactory(JTA_PU_NAME)
and, also by this question&answer:
but the typical JPA configuration in Spring looks like this, so you don't need to create EntityManager manually : @PersistenceContext private EntityManager em;
So, the question is: may I use this annotation @PersistenceContext for the entityManager to be sure that it will be created automatically and I dont need to create it manually?
Currently my @Transactional annotation does not work properly and I'm afraid it is because of creating the entity manager manually!
Please, need help.