Greetings!

I've recreated example, where Bundle is called from Host Application from your site:

http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html#ApacheFelixFrameworkLaunchingandEmbedding-hostservices

named "Using Services Provided by Bundles"

But I can't get it work.

The trouble is in getting service from bundle context. Felix check, is the class, loaded from bundle service reference is the same as the class, loaded from my app by comparing them by == (org.apache.felix.framework.ServiceRegistrationImpl#isClassAccessible)

But, of course it's not the same class, because they loaded by different classloaders. One class is loaded by classloader of my app, the other one with the same name is loaded by bundle classloader. Because of that, I can't call bundle from my app.

- I've put property FRAMEWORK_SYSTEMPACKAGES_EXTRA where put the package name of my interface. - I have a jar with my interface. This jar is deployed as bundle in felix and present in classpath of my app.

It seems that it must work, but it didn't :)

Can someone provide a working example?



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to