No, Hibernate doesn't do that. Either you want cached (and thus potentially stale) data, or you want non-stale (and there's probably not cached) data. The database does not push information out along Hibernate's JDBC connections, and Hibernate Sessions do no tell each other what they are doing (how can they, seeing as different sessions can easily be on different machines, possibly even on different networks, just connected to the same database).
If you have any requirements like this, you have to solve the problems independently of Hibernate. Application servers are good platforms for solving this sort of problem: if you're using anything more light-weight, then you're probably letting yourself in for a lot of work.
_________________ Code tags are your friend. Know them and use them.
|