ehh submit :)
so, after i checked that my entity bean is in the cache:
and yes it's in the cache
after trying to remove it from the cache:
but the log says that
processRemoveNodes(): Can't find node associated with fqn: /a/b/business/model/Felhasznalok/a.b.business.model.Felhasznalok#1Could have been evicted earlier. Will just continue
I don't understand why!
if i remove its parent node than works fine, but it would remove all of the objects instance in the cache, and i don't want this behaviour.
If i put into the cache an object with the same name, it removes that instance using the former mentioned solution.
Other thing i tried that removing with hibernate:
it has no effect.
Am I doing something wrong?
thanks in advance, lazlo
Opening caveat: trying to manually manage the Hibernate 2nd level cache sounds like asking for problems.
The session.evict() call in Hibernate works on the session cache, not the 2nd level cache; that's why it has no effect. Check the Hibernate docs to see if there is an equivalent operation user's are meant to perform on the 2nd level cache; if so use that instead of manipulating TreeCache directly.
If you decide you still want to manipulate the tree cache directly, do you want to call evict() or remove()?
The log message you quoted is debug logging from the background eviction process that you're manually overriding; why are you concerned about it? It's not telling you that your remove() call didn't work.
sorry, everything works with the sessionFactory.evict() method. (the factory's evict is operates on the 2nd level cache)