avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leo Simons <leosim...@apache.org>
Subject Re: Lifecycle extensions support added
Date Tue, 09 Jul 2002 14:27:28 GMT
> 	Simple example, but I hope you get the idea.


> 	I'm in the process of checking the code into Fortress, and will also
> 	be checking in the above example into the
> 	jakarta-avalon-excalibur/fortress/examples directory.
> 	Once the code is checked in, I'm more than open to suggestions, and
> 	feedback, so please feel free to fire away with any questions
> 	(hopefully I or someone else can answer them all!) :)

mostly, this is pretty cool.

What I'm not so sure about is whether it satisfies all use cases. You've
defined 4 stages in the component lifetime where one can register an
extension. But what if you want two extensions in the same stage, in a
specific order?

ie what if I want:

1. contextualize()
2. compose()
3. secure()
4. prepareforexport()
5. initialize()
	6. start()
	7. stop()
8. prepareforunexport()
9. dispose()

to be the customized runtime lifecycle?
(just a stupid example)

The only thing I can think of to be able to do this is to re-introduce
the concept of stages and pipelines.


LifecycleExtension --> LifecycleStage
LifecycleManager --> LifecyclePipeline


interface LifecyclePipeline
	/** append */
	addStage( LifecycleStage stage );
	/** insert after */
		LifecycleStage newStage, LifecycleStage previousStage );
	/** insert after */
		LifecycleStage newStage, LifecycleStage nextStage );

or something like that, where you have Fortress construct the pipeline
at runtime based on some kind of configuration.

It all depends on the amount of flexibility you want to offer, where
increased flexibility means increased complexity. We have some code for
pipelining in the CVS archives; other places to look I know of are axis
and cocoon.

I don't know whether it is needed; I'm relatively sure I don't.

> 	Finally a special thanks to Berin and Leo Simons for their help! :)

hey, thanks to you for doing the hard work!


- Leo

To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>

View raw message