I have a structure that looks like the following:


    <bean id="microserviceManager"
class="org.enjekt.osgi.microserver.impl.MicroWebserviceManager"
init-method="init" destroy-method="destroy">
        <property name="configuration"
ref="microserviceServerConfiguration" />
    </bean>

    <reference-list id="microserviceListener"
interface="org.enjekt.osgi.microserver.api.MicroWebservice">
        <reference-listener bind-method="register"
unbind-method="unregister">
            <ref component-id="microserviceManager" />
        </reference-listener>
    </reference-list>



The configuration information is all about the interceptors, ports,
providers, etc. I want to associate with this microserver.  The problem is
that during startup the manager will hang if there isn't anything in the
list.  I use the refererence-list because I want any and all bundles that
expose themeselves via a MicroWebservice interface to be picked up and not
just the first one.

But it doesn't seem there's a way to do an optional/mandatory with this.
Obviously I want this bundle to come up self-sufficiently.   Incidentally,
the classes for this live in a different bundle so that different service
managers can be started up and I could use filtering on the MicroWebservice
to determine which bundle actually gets exposed.

Is there a way to do this without having to artificially introduce a
MicroWebservice registration?  It may not matter in the end as I may set up
a monitoring/configuration component for each MicroWebserviceManager
anyway.  I just haven't gotten to that point and would prefer this to be
self-sufficient in any case.

Brad

Reply via email to