"[EMAIL PROTECTED]" wrote : How many times does 
ManagedPersistenceContext.initEntityManager() get called?
  | 
  | How many times does Home.setInstance() get called?
  | 
  | Put breakpoints.

For both questions, once.

OK, I'm exhausted after trying to trace through at the end of the day...BUT 
here's my finding:  

I traced down to handleTransactionsAfterPhase() in SeamPhaseListener.java, line 
312.  


  |    public void handleTransactionsAfterPhasel(PhaseEvent event)
  |    {
  |       if ( Init.instance().isTransactionManagementEnabled() ) 
  |       {
  |         log.info("handleTransactionsAfterPhase committing 
here**************");
  |          PhaseId phaseId = event.getPhaseId();
  |          boolean commitTran = phaseId==PhaseId.INVOKE_APPLICATION || 
  |                event.getFacesContext().getRenderResponse() || //TODO: no 
need to commit the tx if we failed to restore the view
  |                event.getFacesContext().getResponseComplete() ||
  |                ( phaseId==PhaseId.RENDER_RESPONSE && 
!Init.instance().isClientSideConversations() );
  |          
  |          if (commitTran)
  |          { 
  |             commitOrRollback(phaseId); //we commit before destroying 
contexts, cos the contexts have the PC in them
  |          }
  |       }
  |    }
  | 

This code suggests to commit/rollback transaction if validation fails, since 
you are checking if event.getFacesContext().getRenderResponse().  This is the 
same check you use in org.jboss.seam.core.Validation in 
afterProcessValidations.  Correct me if I'm wrong.

Could this be why my managed property is set to false, and the em could not 
find the instance anymore?




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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055425
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to