OSGi: How to share objects between components in a single bundle without exposing them to other bundles?

64 Views Asked by At

Is there any proper way to share objects between components in a single bundle?

Objects in this case are somewhat similar to Spring beans. So they are created outside and independently of components.

I've managed to do this by creating an additional "internal" component that is somewhat like a DI root. Unfortunately, that way, this "internal" component is exposed to other bundles. That is undesirable.

0

There are 0 best solutions below