I'm trying to run a bundle within a Felix OSGi container. The problem is I have no control over the configuration of the container and it uses boot delegation which is polluting my bundle's class space. This ends up causing the wrong versions of classes to be loaded. I'd like all classes to be loaded from inside my bundle.

Is it possible to bypass this expected behavior? Maybe by swapping the bundle's class loader with a custom one?