Results 1 to 2 of 2

Thread: Roolback problem not well defined

  1. #1

    Default Roolback problem not well defined

    @Override
    @Transactional(propagation = Propagation.REQUIRES_NEW)
    public Script updatePerson(Person p) {
    Person entity = entityManager.merge(p);
    //entityManager.flush();
    TransactionAspectSupport.currentTransactionStatus( ).setRollbackOnly();


    return entity;
    }

    When the application execute this code ... i would expect to see a rollback message but the entitymanager stored the entity without to signal a problem.

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,625

    Default

    Please use [ code][/code ] tags when posting code that way it remains readable. If there is no rollback you either have a no transactions or have a database (MySQL) with tables that don't support transactions.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Posting Permissions

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