Announcement Announcement Module
Collapse
No announcement yet.
help! greenpages demo jpa persist(transactional) not working Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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 !

  • #2
    kylechenjie:

    If you are asking questions about Virgo Web Server, the best place for this is the Virgo Development Forums.

    Incidentally, the latest version of STS is 2.5.0.RELEASE, the latest version of GreenPages is 2.3.0.RELEASE, the latest version of Virgo Web Server is 2.1.0.RELEASE. You may like to try them.

    It is not altogether clear where your problems lay; but perhaps with more information someone can help over on the Virgo Development Forums.
    Last edited by Glyn Normington; Nov 1st, 2010, 05:52 AM.

    Comment

    Working...
    X