help! greenpages demo jpa persist(transactional) not working
environment:
1)virgo-web-server-2.1.0.M06-incubation
2)STS-2.5.0.M3
3)java version "1.6.0_21"
4)eclipselink jpa 2.0
in greenpages demo:
in my business transaction method with @Transactional annotation, em.persist() method not execute(not insert,no exception).
if i use xml declaration transaction,like this:
<aop:advisor advice-ref="txAdvice" pointcut="execution(* com.demo.service.Registe.registeWithUsername(..))" />
the transaction can commit after method return.
if my transaction method have many persist,like this:
City city=new City(1,"cityname1");
em.persist(city); //A
User user=new User(1,"username1");
user.setCity(city);
em.persist(user);//B
at position A ,it not insert immediately.
if city not immediately, em.persist(user) will error.
my code configuration full like greenpages-incubation-2.3.0.M1 demo.
can any body help me !