JPA, I would do it via repeated em.refresh method calls or query hints (toplink.refresh) - I don't think there is a "nice easy way" of doing it for all entities. I probably would try using query hints on "find all" queries for each major entity class I had.
BTW - I have never actually created such a button, I normally just bounce the app.
Its interesting how all these sorts of problems come up in conversation when you just happen to take your routines for granted.
[Message sent by forum member 'danielrhoades' (danielrhoades)]
http://forums.java.net/jive/thread.jspa?messageID=248496