users@glassfish.java.net

em.flush() doesn't work

From: <glassfish_at_javadesktop.org>
Date: Thu, 28 May 2009 20:50:54 PDT

I use NB 6.5.1, glassfish 2.1, EJB 3, Toplink persistence to MySQL. Project logic is servlet triggers EJB, then EJB to process and em.persist (myobject) to DB. The program works. But all my rows in DB are readable by MySQL client only after the program finished all records. During the execution, SELECT returns empty. I've tried to add em.flush() after em.persist(myobject), but still the same. Why flush() doesn't flush the dirty ones to DB? Any thing I need to set in the persistance unit xml or in MySQL?
[Message sent by forum member 'senderj' (senderj)]

http://forums.java.net/jive/thread.jspa?messageID=348250