|RE: [equinox-dev] Bridging the plain Java and OSGi classloading worlds|
Thanks for those references. They were helpful. It feels like I’m close, but problems remain.
Also, I’m a bit confused as to whether the noted techniques can help my problem. My understanding of the system packages and boot delegation stuff is that it helps OSGi find classes that are not explicitly exported from any of the OSGi bundles (i.e. java.*, javax.* stuff, etc.)
My dilemma is somewhat the opposite. I’m originating from Java, outside of the OSGi environment, but want to call objects created inside of OSGi. Of course, this leads to a ClassCastException when I get the service object and try to refer to it by its interface as loaded in Java land.
I’ve attached my source w/ some class/package names changed to protect the innocent. Also attached is my config.ini file. Without the org.osgi.framework.system.packages.extra directive, the ClassCastException occurs. With it, I don’t get a callback on my ServiceTrackerCustomizer’s addedService() method.
Do you have any further thoughts?
Thanks in advance,
THIS MESSAGE IS INTENDED FOR THE USE OF THE PERSON TO WHOM IT IS ADDRESSED. IT MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM DISCLOSURE UNDER APPLICABLE LAW. If you are not the intended recipient, your use of this message for any purpose is strictly prohibited. If you have received this communication in error, please delete the message and notify the sender so that we may correct our records.
equinox-dev-bounces@xxxxxxxxxxx [mailto:equinox-dev-bounces@xxxxxxxxxxx] On Behalf Of Hal Hildebrand
You can also check out: http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html
note the section "Creating and Configuring the Framework Instance", and the use of the property "org.osgi.framework.system.packages.extra" which makes this a bit easier. Works the same way with Equinox.
On Aug 19, 2009, at 12:13 PM, Hal Hildebrand wrote:
Sure. See http://blog.springsource.com/2009/01/19/exposing-the-boot-classpath-in-osgi/ for an in depth discussion by Costin of SS.
On Aug 19, 2009, at 12:08 PM,