I can't think of a way. If a bundle does not provide a service as a
bundle-scope or prototype-scope service, you cannot force it to provide
multiple implementations.

You could go down the subsystems route in order to get multiple copies of
the UserAdmin bundle installed into the framework. Maybe you should
consider that as a high-level solution for what sounds like a multi-tenant
application... but it's very heavyweight if all you want is multiple copies
of a single service.

Neil

On Tue, Feb 13, 2018 at 11:13 AM, David Leangen <o...@leangen.net> wrote:

>
> Hi!
>
> Although my question is probably a more general OSGi question, I thought I
> would try here first, as it is related to the Felix Useradmin…
>
> I intend to use multiple instances of the Useradmin. The reason is because
> I want to host multiple (small) enterprise customers in one installation,
> but I want to ensure safe segregation of user data. The spec seems to imply
> that there is only one Useradmin, yet I do not see anything in the spec
> that prohibits multiple instances of the service.
>
> In the Felix implementation, it is provided as a service singleton. In
> order to do what I want, I ended up embedding the felix implementation in
> my own bundle and wrapped it with a DS service factory component.
>
>
> I don’t like depending on the implementation code.
>
>
> Is there a better way?
>
>
> Cheers,
> =David
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
> For additional commands, e-mail: users-h...@felix.apache.org
>
>

Reply via email to