Session has a cache, so changes made in a session are not known by the others (That's the normal working way, and I don't know anyway to share info between sessions). The only way to refresh data, so that it is read again from the database, is using the refresh() function of the session, but you may only refresh a single object each time.
session.refresh(myBean)
Where myBean is an entity you saved or read from the database, and is still in session.
Another option, would be to delete the whole session cache, using clear(), or a single entity using evict
Anyway, Is there any reason why you are using a per-http-session hibernate session?. If you wish to cache your data in a consistent way to avoid unnecesary database access, it is much better to use a second level cache, and an hibernate session per http request. That way, you will have an small cache per each request (hibernate session cache), and a bigger cache, common to all users.
|