myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerhard Petracek <gerhard.petra...@gmail.com>
Subject Re: provide a way to define the ordering of ELResolvers
Date Wed, 21 Jul 2010 14:24:25 GMT
as intermediate solution we could introduce an optional comparator (+
web.xml context-param).
-> you can move external el-resolvers e.g. to the end of the list.

advantages:
 - users don't have to call a method which is specific to myfaces-core.
 - if users switch between myfaces-core and mojarra, the only difference is
the performance (if there is no side-effect due to a name clash).

disadvantage:
 - we would introduce a feature which might get deprecated with jsf 2.1+

regards,
gerhard

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


2010/7/21 Jakob Korherr <jakob.korherr@gmail.com>

> Hi Mark,
>
> In the JSF 2.0 spec section 5.2.6, the implemented order is defined, thus
> we cannot change this.
>
> If you want to overwrite it without changing MyFaces core you could create
> your own ELResolverBuilder and set it in ApplicationImpl via
> setResolverBuilderForFaces().
>
> However IMO this is a task the EG has to address for JSF 2.1, because the
> right order can bring a lot of performance improvements and should totally
> be configurable.
>
> Regards,
> Jakob
>
>  2010/7/21 Mark Struberg <struberg@yahoo.de>
>
>> Hi!
>>
>>
>> Currently the ordering of ELResolvers is somehow hardcoded in
>> ResolverBuilderForFaces and ResolverBuilderForJSP.
>> All the additional ELResolvers get invoked before all MyFaces internal
>> ones.
>>
>> This causes a lot traffic in pretty expensive ELResolvers like Spring or
>> CDI
>> ELResolvers.
>>
>>
>> What I miss is a way to explicitely define the _exact_ ordering of
>> EL_Resolvers.
>> In my case I like to invoke the OpenWebBeans ELResolver only after all the
>> 'cheaper' ones got fired, e.g.
>>
>>
>>        elResolver.add(new FlashELResolver());
>>        elResolver.add(new ManagedBeanResolver());
>>        elResolver.add(new ResourceResolver());
>>        elResolver.add(new ResourceBundleELResolver());
>>        elResolver.add(new ResourceBundleResolver());
>>        elResolver.add(new MapELResolver());
>>        elResolver.add(new ListELResolver());
>>        elResolver.add(new ArrayELResolver());
>>        elResolver.add(new BeanELResolver());
>> -> add OWB ELResolver here
>>        elResolver.add(new ScopedAttributeResolver());
>>
>> This would speed up the performance on CDI based pages a lot ;)
>>
>> What is the best way to make this configurable?
>>
>> LieGrue,
>> strub
>>
>>
>>
>>
>>
>
>
> --
> Jakob Korherr
>
> blog: http://www.jakobk.com
> twitter: http://twitter.com/jakobkorherr
> work: http://www.irian.at
>

Mime
View raw message