You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by Gerhard <ge...@gmail.com> on 2010/08/17 13:17:57 UTC

Re: [DISCusS] openwebbeans.configuration new

+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/8/17 Gurkan Erdogdu <gu...@yahoo.com>

> Hello Mark;
>
> Great idea!
>
> Thanks
>
>
> --Gurkan
>
>
>
>
> ________________________________
> From: Mark Struberg <st...@yahoo.de>
> To: dev@openwebbeans.apache.org
> Sent: Tue, August 17, 2010 12:09:39 AM
> Subject: [DISCusS] openwebbeans.configuration  new
>
> Hi!
>
> I was on vacation over the weekend and had an idea about how to improve our
> configuration mechanism. I hacked the idea while flying back from Cologne
> and
> now all is working again.
>
> The change is actually not really big, I just like to get rid of our
> openwebbeans-*.properties and replace them with the following mechanism:
>
> There are still multiple property files for the same configuration, thus
> still
> allowing 'overriding' a configuration. But instead of manually looking for
> defined 'extensions' I just define a 'configuration.ordinal' inside the
> property
>
> thus I define
>
> webbeans-impl/ openwebbeans.properties with 'configuration.ordinal=10'
> webbeans-web/ openwebbeans.properties with 'configuration.ordinal=11'
> webbeans-jsf/ openwebbeans.properties with 'configuration.ordinal=12'
>
> If a properties file doesn't define 'configuration.ordinal' then a value of
> 100
> is assumed.
>
>
> The algorithm is easy:
> .) load all properties you can find with the name
> .) sort them via configuration.ordinal in ascending order
> .) overload them as we do already, but instead of some defined names we now
> just
>
> use the sorted list of properties.
>
> WDYT?
>
> It's all ready to get checked in :)
>
> LieGrue,
> strub
>
>