Well, I am by no means an expert, but these are my 2 cents, and they
certainly won't harm.

>Since a few days we are switching our Project from ECM to Phoenix 4.0.1.
The
>first components we tested worked just fine but now we seem to hit some
>subtle semantic differences that cause us some trouble:

This implies, that your problem is NOT rooted in a a general incompatibility
with the concepts endorsed by the Avalon Framework, but rather Phoenix
specific. Is that right?

>2. All components are instantiated and even started before lookup.
>   This seems to block everything else because the start (or execute)
>   methods of my components usually do a lot of work and are sometimes
>   supposed to be started in an own thread (which would exist when
>   lookup is done).

So we are talking components, not blocks, right? (Referring to one of your
latter postings)

There seem to be two kinds of components (well, there will be more;)) in
your application:

A) Components that are amenable to the Phoenix way of instantiating and
managing them, e.g. components that are inexpensive at startup time.

B) Components that are VERY expensive to instantiate and initialize, thus
causing Phoenix to block at startup. It appears to me - judging from your
remarks and the discussion that ensued - that these must not be managed by
Phoenix directly.

My first thought when reading this was:

1. Leave those components that do no harm to be managed by Phoenix directly.

2. Instead of writing a factory for those expensive components, why not let
them be managed by the Excalibur Component Manager (or a custom derivative,
if more applicable), which is - after all - a component that could, in turn,
be managed by Phoenix? Whenever some component needs to instantiate an
expensive component, it would ask the component manager provided by Phoenix
for your custom component manager, asking the latter for the component you
could have been asking for in the first place, if this was the best of all
possible universes;) It appears, that this is not so far off your component
factory, but would relieve you from the burden of explicit lifecycle
management. There is a further level of indirection in here, in that the
Phoenix configuration for your component manager would probably have to
encapsulate the configuration(s) the components managed by it, but that
might be acceptable.

On the other hand, this might totally break the Phoenix way of component
mangement. I am not at all acquainted with its innards, so cannot decide
this.

As you will notice, I have never actually worked with Phoenix and only just
started working with ECM, so all of this might be complete rubbish. But who
knows? It might help.

>I hope somebody can help me with this.

Hope this does. A bit.

Regards,

Olaf


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

Reply via email to