2 Replies Latest reply on Feb 8, 2007 5:28 AM by jameswoodward

    FlushMode.MANUAL being ignored???

    jameswoodward Newbie


      I recently purches the eBook "Java Persistence with Hibernate" and am working through the chapters.

      Why is it that this code reports a flushMode of AUTO, when it should be MANUAL?

      public class MySessionBean implements MySession {
       private static final Log log = LogFactory.getLog(MySessionBean.class);
       @PersistenceContext(type=PersistenceContextType.EXTENDED, properties=@PersistenceProperty(name="org.hibernate.flushMode", value="MANUAL"))
       private EntityManager entityManager;
       private CounterDAO counterDAO;
       public void test() {
       org.jboss.ejb3.entity.HibernateSession hs = (org.jboss.ejb3.entity.HibernateSession) entityManager;
       org.hibernate.Session session = hs.getHibernateSession();
       org.hibernate.FlushMode flushMode = session.getFlushMode();
       for (int i = 0; i < 100; i++) {
       Integer value = counterDAO.increment(threadName);
       public void flush() {
       public void destroy() {