[jboss-user] [EJB 3.0] - Re: caching onetomany relation

laszlo.fogas do-not-reply at jboss.com
Wed Oct 11 17:39:41 EDT 2006


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:

anonymous wrote : 
  | org.jboss.ejb3.entity.HibernateSession hs = (HibernateSession) entityManager;
  | 			org.hibernate.Session session = hs.getHibernateSession();
  | 			session.flush();
  | 			session.getSessionFactory().evict(result.getClass(), result.getUid());
  | 

lazlo

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977705#3977705

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977705



More information about the jboss-user mailing list