avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ole Bulbuk <Ole.Bul...@ebp.de>
Subject singleton component and components/objects used by multiple other components
Date Thu, 23 May 2002 14:36:08 GMT
At the moment I've got two (somewhat similar?) questions:

1. How can I make a component (a statistics component) a singleton?
   Every component elsewhere in the server should be able to
   access this component easily.
   Does it work if I declare this component to be thread safe?
   Will every other component get the same instance when doing
   a lookup then?

2. How can I create a component that can be accessed by two other
   components?
   I need the following:

    Input component
            |
            \--------\
                      > Buffer component 1
            /--------/
            |
    Parser component
            |
            \--------\
                      > Buffer component 2
            /--------/
            |
    Output component

   So I need two buffer components (same class but different
   instances and configuration).

   My idea so far is to make all of these components (including
   the buffers subcomponents of the main server component.
   But I would need a way for the main server component to give
   the buffer components to the other components before these
   other components are started.

I use the ECM with a role configuration file.

I hope there is a standard way to deal with situations like these.
But I didn't find anything in the documentation.

Any comments are welcome.

Regards,

Ole
-- 
Ole Bulbuk              Tel.:   0331/74759/60
Ernst Basler + Partner  Fax:    0331/74759/90
Tuchmacherstr. 47       E-Mail: mailto:ob@ebp.de
14482 Potsdam           WWW:    http://www.ebp.de

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


Mime
View raw message