[jboss-user] [JBoss Seam] - Re: Hibernate and regular JSF validation and EntityHome prob

hstang do-not-reply at jboss.com
Mon Jun 18 17:28:04 EDT 2007


  | @Transactional
  | public boolean isManaged() 
  | {
  |   return getInstance()!=null &&
  |             getEntityManager().contains( getInstance() );
  | }
  | 

getEntityManager().contains( getInstance() ) is returning false is the culprit.

So I checked whether the EM has changed by looking at the hash code (is this a valid way of doing it?), and the hash codes remain constant throughout the conversation.  As well, the (T) getComponentInstance( getPersitenceContextName() ) is only called once, which is expected, so it doesn't appear the EM is ever null.

The getInstance() hasn't changed either--it's not null.  

Is there anywhere in Seam where em's cache is cleared either explicitly or implicitly?  

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

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



More information about the jboss-user mailing list