Is it possible to use @Transational worked in Spring, Eclipselink &Tomcat environment? -
Is it possible to use @Transational worked in Spring, Eclipselink &Tomcat environment? -
hiall, confused eclipselink tomcat documentation saying:
limitations jpa: no @persistencecontext injection of container managed persistence unit available - utilize persistence.createentitymanagerfactory(jta_pu_name)
and, question&answer:
but typical jpa configuration in spring looks this, don't need create entitymanager manually : @persistencecontext private entitymanager em;
so, question is: may utilize annotation @persistencecontext entitymanager sure created automatically , dont need create manually?
currently @transactional annotation not work , i'm afraid because of creating entity manager manually!
please, need help.
eclipselink documentation says @persistencecontext not handled tomcat on own. however, if utilize spring, @persistencecontext handled spring, can utilize it.
see also:
13.5 jpa spring tomcat transactions annotations eclipselink
Comments
Post a Comment