>From google: "By default, the database flush mode is set to AUTO. This means that the Entity-Manager performs a flush operation automatically as needed. In general, this occurs at the end of a transaction for transaction-scoped EntityManagers and when the persistence context is closed for application-managed or extendedscope EntityManagers. In addition, if entities with pending changes are used in a query, the persistence provider will flush changes to the database before executing the query.If the flush mode is set to COMMIT, the persistence provider will only synchronize with the database when the transaction commits.However, you should be careful with this, as it will be your responsibility to synchronize entity state with the database before executing a query. If you don’t do this and an EntityManager<http://docs.oracle.com/javaee/6/api/javax/persistence/EntityManager.html>query returns stale entities from the database, the application can wind up in an inconsistent state."
Did try to change it to auto but made no difference. On 29 July 2013 12:25, Glen Mazza <glen.ma...@gmail.com> wrote: > OK, I'll check, but what happens if you go to the Roller maintenance tab > and click on "Flush blog" (that will normally empty out the cache) -- > problem solved then? > > Note I had to bring back your changes after the move to fewer modules, I > might have missed something. > > Glen > > On 07/29/2013 07:20 AM, Greg Huber wrote: > >> Glen, >> >> Can you test whether you can delete a media file folder? ie add a folder >> and then try and delete it. For me it seems to delete it OK but when you >> refresh the media file folder view it is still there. If I then shut down >> tomcat and restart it is gone. It seems something to do with its cache? >> >> checking: >> >> public Query getNamedQuery(String queryName) >> .... >> q.setFlushMode(FlushModeType.**COMMIT); >> >> it sets the query to flush on commit, which should in theory flush the >> query cache when the transaction is committed. >> >> Is there some callback method we need to call to get it to flush? >> >> >> Cheers Greg >> >> >