I found the problem – I attached some _javascript_ on the onclick attribute with the commandLink that does the submission. The _javascript_ caused double submit(). So there was indeed two parallel executions at the same time.

 

It seems that both submit() run on the same thread (with the same HibernateFilter etc). That is very strange – as I would have thought that the second submit() should at least execute on a different thread.

 

Regards,

Yee

 


From: Yee CN [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 16 November 2005 1:10 AM
To: 'MyFaces Discussion'
Subject: RE: Very puzzling out of order execution...

 

Sorry, the last one was a bit grabbled. I also just noticed that it seems that there are two parallel execution happening at the same time?!?

---------------------------

 

Hi,

 

I am having this very puzzling out of order execution. My setup is as following:

 

I have 4 filters, in this order – SecurityFilter, HibernateFilterLong, JSF-Spring filter, myfaces ExtensionFilter.

 

Now look at the following trace, my comments in brackets. Can somebody please explain?

 

Regards,

Yee

 

-------------------------------------------------------------------------------------

INFO: BEFORE UPDATE_MODEL_VALUES(4)

16/11/2005 00:45:12 com.traleva.erp.web.util.PhaseTracker afterPhase

INFO: AFTER UPDATE_MODEL_VALUES(4)

16/11/2005 00:45:12 com.traleva.erp.web.util.PhaseTracker afterPhase

INFO: AFTER RENDER_RESPONSE(6)

16/11/2005 00:45:12 com.traleva.erp.web.util.PhaseTracker afterPhase

INFO: AFTER UPDATE_MODEL_VALUES(4)

16/11/2005 00:45:12 com.traleva.erp.web.util.PhaseTracker afterPhase

INFO: AFTER RENDER_RESPONSE(6)

16/11/2005 00:45:12 com.traleva.erp.web.util.PhaseTracker beforePhase

INFO: BEFORE INVOKE_APPLICATION(5)

00:45:12,975 DEBUG FacesServlet:132 - service end

 

(myfaces ExtensionFilter is finishing in the middle of JSF life cycle! How can that be?)

 

00:45:12,985 DEBUG HibernateFilterLong:95 - Commiting any pending company database txn

 

(HibernateFilterLong is beginning to wrap up after ExtensionFilter)

 

16/11/2005 00:45:13 com.traleva.erp.web.util.PhaseTracker beforePhase

INFO: BEFORE INVOKE_APPLICATION(5)

 

(And yet the JSF life cycle is still continuing, interleaving with HibernateFilterLong execution …)

 

00:45:13,045 DEBUG HibernateFilterLong:103 - Disconnecting Company Hibernate Sessions

16/11/2005 00:45:13 com.traleva.erp.web.util.PhaseTracker afterPhase

INFO: AFTER INVOKE_APPLICATION(5)

00:45:13,055 DEBUG HibernateFilterLong:105 - Storing the hibernate sessions in http session

16/11/2005 00:45:13 com.traleva.erp.web.util.PhaseTracker afterPhase

INFO: AFTER INVOKE_APPLICATION(5)

00:45:13,055 DEBUG HibernateFilterLong:114 - End of filter

 

(HibernateFilterLong finished…)

 

16/11/2005 00:45:13 com.traleva.erp.web.util.PhaseTracker beforePhase

INFO: BEFORE RENDER_RESPONSE(6)

16/11/2005 00:45:13 com.traleva.erp.web.util.PhaseTracker beforePhase

INFO: BEFORE RENDER_RESPONSE(6)

00:45:13,125 DEBUG LookupBean:67 - getLookupTypeSelectList() called

00:45:13,165 ERROR [jsp]:704 - Servlet.service() for servlet jsp threw exception

 

(And finally I got an exception – because the Hibernate session is no longer there!!!)

 

javax.faces.el.EvaluationException: Cannot get value for _expression_ '#{lookupBean.sortedLookupList}'

      at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:397)

      at javax.faces.component.UIData.getValue(UIData.java:779)

      at org.apache.myfaces.component.html.ext.HtmlDataTableHack.createDataModel(HtmlDataTableHack.java:350)

      at org.apache.myfaces.component.html.ext.HtmlDataTableHack.getDataModel(HtmlDataTableHack.java:333)

      at org.apache.myfaces.component.html.ext.HtmlDataTable.getDataModel(HtmlDataTable.java:428)

 

Reply via email to