I think I now understand what I have failed to explain here (and I
probably know why my service is acting like tantalus).

My plan is to create a series of docker containers. Call them
'workers'. Each worker publishes the same restful service; each one of
them handles one or more 'tasks'. The worker accepts work via a single
RESTful service, and dispatches the work to the tasks based on
parameters in the requests to the service.

The set of tasks implemented on a particular worker is controlled the
set of OSGi bundles I provision in it. I have a whole slew of them,
each registers a 'RosetteComponentService'.

Each of these task bundles has, potentially, a bit of a startup delay
as it gets organized.

I don't want to open the restful service until the components are all set up.

In spite of all the email I've sent up to this point, it dawns on me,
a bit belatedly, that my own configuration file for a worker does list
the components that it expects to find.

So, I can set up a protocol where the restful service component waits
for all the components to 'light up' and then lights itself up, since
it knows what is supposed to be there. But not at compile time, so I
can't use a cardinality property.

One approach would be to @Reference the list, and then do a little
sleep loop waiting until everyone arrives. I am going to go read on
event admin to see if I can use that to sleep on an event that would
indicate that a new example has shown up.

Thanks for all your patience; I think this much will keep me out of
your hair for a while.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org

Reply via email to