deltaspike-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerhard Petracek <gerhard.petra...@gmail.com>
Subject Re: [Discuss] correct handling of multiple ClassDeactivator
Date Mon, 20 Feb 2012 15:32:10 GMT
hi rudy,

yes - you are right. after fixing #getPropertyValue we didn't check
#getAllPropertyValues.
i'll create a test for it (we planned to do that in any case) and fix it.

thx & regards,
gerhard



2012/2/20 Rudy De Busscher <rdebusscher@gmail.com>

> Hi,
>
> Multiple ClassDeactivator can be defined and handled by the
> method
> org.apache.deltaspike.core.util.ClassDeactivation#initDeactivatableCacheFor
>
> This method
> uses
> org.apache.deltaspike.core.api.config.ConfigResolver#getAllPropertyValues
> to retrieve all defined ClassDeactivator by all ConfigSources.  So suppose
> we have the following scenario
>
>
> SystemPropertyConfigSource    400    ClassDeactivator1
> PropertyFileConfigSource          100    ClassDeactivator2
>
> Since getAllPropertyValues returns the names of the ClassDeactivator in the
> order of the ordinal (thus  ClassDeactivator1 first and
> then ClassDeactivator2), The ClassDeactivator2 has the chance to overrule
> the decision of ClassDeactivator1.
>
> But it seems more logic to have the opposite since ClassDeactivator1 is
> defined in a configSource with a higher ordinal.
>
> *Proposition*
>
> getAllPropertyValues() returns the values in reverse order, so
> that  ClassDeactivator2 comes before ClassDeactivator1.
>
> Or when there are future usage for seen that don't break if they are
> returned in reverse order, an additional parameter that controls the order.
>
> WDYT?
>
>
> --
> Rudy De Busscher
> http://www.c4j.be
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message