Results 1 to 2 of 2

Thread: help! greenpages demo jpa persist(transactional) not working

  1. #1
    Join Date
    Oct 2010
    Posts
    3

    Default 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. #2
    Join Date
    Feb 2009
    Location
    Hursley, near Winchester, UK
    Posts
    37

    Default

    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 at 04:52 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •