+1 Imo custom ProjectStageProducers are blurp in any case!

We provide one central ProjectStageProducer which reflects exactly what is 
configured and should pickup all those settings from JNDI, config, etc as you 
mentioned. Having any other producer for ProjectStages is not useful.

Also don't over-use the ProjectStage. This sounds more like you are trying to 
solve orthogonal concerns. I'll give you an example about how we did it. 

In our case we created an additional ConfigService which returns the proper 
values not only depending on the ProjectStage, but also depending e.g. on the 
configured Database (MySQL, PostgreSQL, Oracle).


LieGrue,
strub


----- Original Message -----
> From: Gerhard Petracek <[email protected]>
> To: [email protected]
> Cc: 
> Sent: Sunday, March 25, 2012 11:03 AM
> Subject: Re: ProjectStageProducers before ProjectStage?
> 
> hi jason,
> 
> right now we (should) have:
> - you don't need a custom project-stage producer to provide a custom
> project-stage
> - for configuring a custom project-stage (value) just configure the custom
> value.
> - for using a custom config format,... just provide a custom
> implementation of ConfigSource.
> - a custom project-stage producer is just a last resort to
> customize/replace the default behaviour (in this area).
> - there is only one (custom) producer and not a chain of custom producers.
> - a custom producer has to implement the whole logic on its own.
> 
> regards,
> gerhard
> 
> 
> 
> 2012/3/25 Jason Porter <[email protected]>
> 
>>  As it currently exists in both v0.1 and v0.2 if there is a custom
>>  ProjectStagProducer that value will be used for the project stage instead
>>  any ProjectStage listed in another config. Example:
>> 
>>  custom producer sets stage to MyProjectStage
>> 
>>  LocalJndi, SystemProperty, EnvironmentProperty or even an
>>  apache-deltaspike.properties file say project stage should be something
>>  else.
>> 
>>  The final value for project stage will be MyProjectStage.
>> 
>>  Is this really how we want it? I could certainly see admins and developers
>>  thinking it should not. You also can't unset a value with some other 
> config
>>  earlier in the chain.
>> 
>>  My current thoughts are that we should first look for a ProjectStage value,
>>  then a ProjectStageProducer if a ProjectStage is not found. If neither of
>>  those are set, then set the project stage to Production as we are currently
>>  now doing it.
>> 
>>  WDYT?
>> 
>>  --
>>  Jason Porter
>>  http://lightguard-jp.blogspot.com
>>  http://twitter.com/lightguardjp
>> 
>>  Software Engineer
>>  Open Source Advocate
>>  Author of Seam Catch - Next Generation Java Exception Handling
>> 
>>  PGP key id: 926CCFF5
>>  PGP key available at: keyserver.net, pgp.mit.edu
>> 
> 

Reply via email to