Transaction life is something like:
begin()
flush()
flush()
...
commit or rollback
flush is a write from memory to database (in this case), but if database transaction is started (and mostly hibernate transaction ~ db transaction) it can be still rollbacked, or commited.
clear() will clean the session cache, be sure you call the flush before it or you will loose your changes.
For example, you can see the usage of frequent flush, clear here:
http://www.hibernate.org/hib_docs/v3/re ... batch.html
Regards,
Pavol