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:
1. ServiceManager.lookup() seems to deliver a proxy instead of the
requested component. The problem is that the component implements
an interface (Executable) that the proxy doesn't implement.
So we don't get to know that we should call the execute method
anymore and the component doesn't do its work anymore.
I suppose that the proxy could be executed (with proxy.execute())
and would then call component.execute(). But how do I know???
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).
3. How am I able to get more than one instance of the same component
with the same role? I need this to run the same component in
multiple threads. Only the implementation of the component could
decide that the component is threadsafe (but usually it is NOT).
So how can I get multiple instances of a (non) threadsafe
component?
4. How can I use the ServiceSelector with Phoenix? There doesn't exist
a .xinfo file in the same .jar file. I would like to be able to
select a component (compiler implementation) at runtime according
to the incoming data (for some data we need a different compiler
than for the other data).
The overall architecure of the server looks like this:
InputComp --- CompMultiplexer --- Inputreader1Comp
| ... | ...
\-- CompMultiplexer -+- InputreaderXComp
/-------------/
InputPool /
\-------------------\
ConversionComp --- CompMultiplexer -+- Converter --- Compiler1
/ | ...
| \-- CompilerY
/-----------------/
OutputPool /
\--------------\
OutputComp --- CompMultiplexer --- OutputWriterComp --- Writer1
| ...
\-- WriterZ
The CompMultiplexer is a class (not a component) that "multiplexes" a
component by running it in multiple threads.
The InputPool and the OutputPool are thread safe and have to exist only
once. Since they are both implemented by the same class they two instances
of this class have to exist.
I hope somebody can help me with this.
Regards,
Ole
--
To unsubscribe, e-mail: <mailto:avalon-users-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-users-help@;jakarta.apache.org>