-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: FlushMode.MANUAL being ignored???
PostPosted: Wed Feb 07, 2007 1:14 pm 
Newbie

Joined: Wed Feb 07, 2007 1:10 pm
Posts: 7
Location: Kent, UK
Hi,

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?

Code:
@Stateful
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;
   
    @EJB
    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();
        log.info(flushMode);
       
        for (int i = 0; i < 100; i++) {
            Integer value = counterDAO.increment(threadName);
        }
    }

    public void flush() {
        entityManager.flush();
    }

    @Remove
    public void destroy() {
        log.info("FtpSessionBean.destroy()");
    }
}


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 07, 2007 9:33 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Probably because I haven't implemented that yet :-)
Check JIRA and add one if it's not there. Put version 3.2.2 as a target.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 08, 2007 6:24 am 
Newbie

Joined: Wed Feb 07, 2007 1:10 pm
Posts: 7
Location: Kent, UK
Thanks for the quick response, I couldn't see this issue in JIRA, so have created it.

http://opensource.atlassian.com/project ... se/EJB-267


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.