Re: [picocontainer-dev] Bug in DefaultPico?
Paul Hammant <[email protected]>
| Newsgroups | gmane.comp.java.picocontainer.devel |
|---|---|
| Message-ID | <[email protected]> |
>
>
>>> I'm also thinking of moving the start, stop, and dispose operations
>>> to a
>>> Visitor. (The visitor doesn't have to be transient, so it would be
>>> possible for
>>> it to keep track of what CA's and what Child containers were
>>> started.) It
>>> should help move several of the additional data structures sitting
>>> in Pico to
>>> other more reusable objects.
>>
>> Meh.
>>
>> With Pico2 I deleted Aslak's visitor abstraction and lifecycle impl
>> of
>> it. I did not like the way that from root it would traverse the
>> entire tree.
>>
>> With Pico, you can chain containers together. Each in a parent,
>> child, grandchild situation might have a different set of behaviors
>> incl lifecycle. By each Pico instance delegating to the next's
>> start() methods, there a decent mechanism to subvert the
>> traversal. I
>> think that superior - even though its slightly more code.
>
> True -- And even then I never thought about traversing child
> containers. But
> since there's so much data being used to handle lifecycle events, I
> still think
> that the behavior needs to be encapsulated. I'll work up a proposal
> and post
> the diff to jira.
Well the LifecycleStrategy is pluggable, with a few impls provided.
There used to be LifecycleManager and Lifecycle Strategy, but the
former was eliminated in refactorings of early on in Pico2 (it really
was not offering any value) and the latter is not really a strategy
anymore.
I think its OK as is - but am curious to see what you can suggest.
- Paul
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email