Commiting is the wrong word. The proper word is "flush".
By flushing the enitymanager, is synchronizes with the DB and writes your changes, but it's still part of the overall transaction.
If you later rollback, the changes will rollback normally.
The JPA tends to delay writes to the DB to as late as practical (typically at transaction end). Calling EntityManger.flush() will fix that.
[Message sent by forum member 'whartung' (whartung)]
http://forums.java.net/jive/thread.jspa?messageID=257086