5 Replies Latest reply on Feb 24, 2012 3:56 PM by Scott Marlow

    Auto flush does not work in container managed transaction

    Adriano Scheffer Newbie

      When i use the this SFSB


      public class TestAutoFlush implements Serializable {
                @PersistenceContext(type = EXTENDED)
                EntityManager entityManager;
                public void persistEntity() {
                     MyEntity e = new MyEntity();
                     e.setId(new Random().nextInt());
                public void joinTransaction() {
                     // auto-flush expected


      If a call




      My persistence context is not flushed.



      Is this a problem with AS 7 or am I missing some new configuration?