You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Yee CN <ye...@streamyx.com> on 2005/11/15 18:01:02 UTC

Very puzzling out of order execution...

INFO: AFTER UPDATE_MODEL_VALUES(4)

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

INFO: AFTER RENDER_RESPONSE(6)

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

 

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

 

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(Html
DataTableHack.java:350)

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

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


Re: Very puzzling out of order execution...

Posted by Jeremy Green <my...@jeremygreen.me.uk>.
> I have 4 filters, in this order - SecurityFilter, HibernateFilterLong,
> JSF-Spring filter, myfaces ExtensionFilter.

Just a thought: are the filters really set up in web.xml in the right 
order? If you're mixing filter mappings by URL pattern with filter 
mappings by Servlet class name, then the order might not be what you 
expect - see the Servlet spec. on the Sun website.

Jeremy