3 Replies Latest reply on Dec 7, 2007 8:00 AM by Stateless Bean

    Seam and ejb3.0 transactions question?

    Stateless Bean Novice

      I got simple method with annotation:

       public String saveOrder() {
       try {
      //block A
      //Block B
       catch (Exception e) {}
       return "error";

      and my em is managed by container

       protected EntityManager em;
       <persistence:managed-persistence-context name="em" auto-create="true"

      block A load some entities and calc somethink,
      in block B i force method to get error.
      In this case when I get error there should be whole transaction rolled back, but all changed are saved? Why and how can I roll back when I get some/any error?