As an example, in Governator, there is an @PreConfiguration annotation. This 
allows an instance to make changes to the configuration source before 
@Configuration assignments are done. Further, both of these happen before 
@PostConstruct methods are called. 

I really like how the Disposer/DefaultDisposer container is designed. My 
thought is to generalize this to something like Stager/DefaultStager which 
would be a container for an object to go through stages. The user of Stager 
would call a method, advance(Stage stage), or something to move to the next 
stage. Onami users (like Governator in the future) could use this to control 
fine grained object lifecycle.

-Jordan

On Feb 25, 2013, at 12:23 AM, Simone Tripodi <simonetrip...@apache.org> wrote:

> Hi Jordan!
> 
> that is an interesting option, I kindly ask you to qualify the action
> associated to each phase/stage.
> 
> i.e., for configuration, we defined a dedicated `configuration`[1]
> module which, if used with `converters`[2], delegates to Guice the
> task to simply Inject & Configure elements; for validation, we also
> defined a dedicated module which integrates JSR303 (Bean Validation).
> 
> We are anyway open to discuss in a rounded table other options, in
> order to simplify Onami components adoption by more users.
> 
> TIA, all the best!
> -Simo
> 
> [1] http://onami.incubator.apache.org/configuration/
> [2] http://onami.incubator.apache.org/converters/
> [3] http://onami.incubator.apache.org/validation/
> 
> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
> 
> 
> On Mon, Feb 25, 2013 at 2:36 AM, Jordan Zimmerman
> <jor...@jordanzimmerman.com> wrote:
>> What do you folks think about generalizing Lifecycle to support arbitrary 
>> stages. Currently, there is AfterInjection and Dispose. Governator, for 
>> example, has Pre Configuration, Configuration, Set Resources, Post 
>> Construction, Validation and Warm Up. The "Disposer" interface could be 
>> generalized into general purpose StageContainer and could manage state 
>> changes on a object going through its lifecycle. Each stage would be 
>> associated with an Annotation.
>> 
>> Thoughts?
>> 
>> -Jordan

Reply via email to