[jboss-user] [JBoss Seam] - Re: Scope of EntityManager

dapeng do-not-reply at jboss.com
Wed Dec 19 08:59:08 EST 2007


Hi, 

I found the problem and it is a bug in the ajax4jsf in the class org.ajax4jsf.resource.ResourceLifecycle. There in the method processPhaseListeners all PhaseListener except the first 1 will be notified about the "after phase". The loop end condition should definitely be i >= 0. Under this condition the first listener, which is the SeamPhaseListener will not be notified.

anonymous wrote : private void processPhaseListeners(PhaseListener[] phaseListeners,
  | 			PhaseEvent phaseEvent, boolean beforePhase) {
  | 		if (beforePhase) {
  | 			// Invoke before phase listeners
  | 			for (int i = 0; i < phaseListeners.length; i++) {
  | 				PhaseListener phaseListener = phaseListeners;
  | 				invokePhaseListener(phaseListener, phaseEvent, beforePhase);
  | 			}
  | 
  | 		} else {
  | 			// Invoke after phase listeners, in reverse order.
  | 			for (int i = phaseListeners.length - 1; i > 0; i--) {
  | 				PhaseListener phaseListener = phaseListeners;
  | 				invokePhaseListener(phaseListener, phaseEvent, beforePhase);
  | 			}
  | 
  | 		}
  | 	}

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

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



More information about the jboss-user mailing list