Short Explanation of what I want to do:

I have an existing spring enabled JEE application (ear, war and ejb jars). The application has to be deployed on an Oracle Weblogic 10.3.3+ application server. I want to add an OSGi engine (Equinox) to each of the modules to deploy a couple OSGi bundles and expose the services in the spring context of the application.

I managed to start the OSGi engine and to start the bundles. Looking at the sources of BIRT was a great help here. But now comes the difficult part. How can I hook up the OSGi bundle context with the web/ejb spring application contexts?

To be able to use the osgi:reference tag in spring context files, the bundle context has to be known and injected in the OsgiServiceProxyFactoryBeans. I can get hold of the bundle context but it appears to be loaded in a different
classloader, hence I get a classcast exception.

Is there a clean way to get this working?

Regards,
Geert