1 Reply Latest reply on Aug 28, 2008 10:44 AM by marx3

    Rollback transaction

    marx3 Apprentice

      How to rollback transaction in conversation bean managed by container? I use Seam managed transaction because it helps me with lazyInitializationException, so I can't manually manage transactions.

      1)Simply throwing exception cause displaying debug page

      2)throwing exception from method annotated with

      @TransactionAttribute(value = REQUIRES_NEW)

      and catching it in another method doesn't rollback transaction at all.


      protected SessionContext sessionContext;

      cause something strange with conversation - while transaction rollbacks, application state is incosistent.

      3)Any try with:



      Caused by: javax.ejb.EJBTransactionRolledbackException: JTA EntityManager cannot access a transactions

      which is logical.

      4)I can do:


      but there is no entitymanager.rollback or sth similair, so how to rollback?