Do you see any cache update entries in your log file when you try this with simple entities? What do you see in your logs when you try this with collections?
I did some crosspost sorry! You can find more info here:
I checked the logs:
update an simple entity:
Time: 18:59:59 Priority: DEBUG Thread: TP-Processor2 NDC: null Logger: org.hibernate.cache.TransactionalCache Location: org.apache.commons.logging.impl.Log4JLogger.debug(Log4JLogger.java:84) Message: updating: xxx.model.Kedvencek#48
during collection update no cache log appears.
And I found an interesting forum topic here, where Gavin says that i want impossible thing:
What's your opinion about this?
Do i have to manually evict the collection after each update(in postupdate event or in interceptor?)
just wonder what is the java command to manualy evict the collection?
sorry for answering late:
as far as I know there's no way to access treecache through the hibernate entitymanager. Maybe with a JNDI lookup you can get the underlaying MBean.
But there's a solution: cast the entitymanager to hibernate session and something like this:
org.jboss.ejb3.entity.HibernateSession hs = (HibernateSession) entityManager;
org.hibernate.Session session = hs.getHibernateSession();