On 9/15/07, Richard S. Hall <[EMAIL PROTECTED]> wrote:
> Perhaps I don't understand exactly what you are asking, but doesn't the
> example application basically do what you want?
>
> http://cwiki.apache.org/FELIX/apache-felix-application-demonstration.html...

>From the functional side of things yes, but what I'm after is some
form of shielding classloader that completely hides the fact that
Felix is used to run my tool.

Hopefully the example below is clearer:

// hammer.jar is in the classpath
// hammerl.jar embeds the Felix runtime, and a number of
// OSGi bundles, used internally

// Hammer comes from hammer.jar
Hammer h = HammerFactory.createHammer();

// This must fail: Felix classes, and classes found in mytool.jar
// except the Hammer interfaces, must be "invisible"
Class.forName("org.apache.felix.framework.Felix");

> ...Perhaps you also wish to make the bundle JAR files embedded into this
> single JAR file too? This should be fairly easy, just embed them as
> resources and then use getResource() to get a resource URL to them and
> use that URL to install them into your Felix instance...

Yes, that shouldn't be too hard, the problem lies more in the
classloader isolation described above.

Thanks for your reply - hope this clarifies what I'm after!
-Bertrand

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to