Thanks Christian, I'll take your advice in mind and I'll re-read those chapters.
I hope this advice do not be like the "use FlushMode.NEVER" previous, for an app that wish to modify rows in the database.
Anyway, I have solved my problem using clear() method, but I think that this isn't satisfactory enough. Why ? It's easy, my users all have a view from a repository, for example:
A
|
--B
| --B1
| --B2
--C
If the user refresh node B2, clear() will remove from the caché nodes A,B,B1 and C. Later access to this nodes will suppose extra database hits.
I'm going to use some second level caché like EHCache to minimize this database hits.
Both, thanks for your help, in spite of little hostility in the replies it helps me.
|