myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leonardo Uribe <>
Subject Re: Issues using View Pooling - ViewScope is missing for static structure views?
Date Tue, 24 Mar 2015 02:13:59 GMT

Thanks for your kind words about the view pooling algorithm :-).

It looks there are two issues here.

- Add null check on pushPartialView(...) : The solution is correct,
I'll commit it soon.

- View scope not restored correctly on static structure views : I have
not been able to reproduce the problem (it works for me with the
latest code, and I do not see a bug in the code). The algorithm used
to deal with static/partial and the algorithm for dynamic views has
some differences, so it should be something very specific that
activates the problem. If you can provide a simple demo that shows the
problem, that would be very helpful. The problem with these kind of
issues is they are usually really hard to debug, because reproduce
them can be very difficult. Anyway, please open a new issue on myfaces
issue tracker, so we can keep track on this.


Leonardo Uribe

2015-03-22 20:04 GMT-05:00 Chris Kulinski <>:
> We're testing the View Pooling features of MyFaces 2.2.x on a large pre-existing JSF
site with very complex and heavy views with lots of composite components.
> The performance improvement is frankly amazing - we've gone from GC events every few
seconds under heavy load to virtually no GC events at all...   Kudos to Leonardo for building
in this feature!
> We've encountered one specific issue - a NullPointerException when using oamEnableViewPool="false"
to disable pooling for specific views.  We've created
for this issue.
> We needed to disable pooling for certain views because we noticed issues with "static
structure" views when using ViewScope.  Our ViewScope beans are available in our controller
code, but are no longer available during the Render Response phase in our xhtml pages - via
expression language lookups.
>    - On the very first request to the view (before its placed in the pool), the state
is applied correctly - but then every subsequent request to the pooled view doesn't have the
correct view state.
>    - It looks like the view state hasn't been correctly applied on the view after its
retrieved from the pool.
> Ways we've been able to work around this issue:
>    - If we disable view pooling for these views, then the beans are correctly available
in ViewScope.
>    - We don't see this issue on any of our "dynamic structure" views - in fact, if we
convert the static structure view to a dynamic structure view (via an extra ui:include with
EL, etc), then the view state is mapped correctly and the viewscope beans are available. There
must some pooling state restore logic that's missing from static structure logic?
> Has anyone else seen this issue?  Or has anyone implemented view pooling with static
and dynamic structure views and view scope?
> Thanks!Chris Kulinski

View raw message