I'm interested in
doing work on the Eclipse framework to allow it to run embedded as part of a
In this environment each servlet
application can launch it's own independently configured instance of Eclipse.
This has three implications:
- Several instances
of Eclipse might be
running in the same JVM
- Eclipse can't
control how resources on the JVM's bootloader have been configured or
- The servlet
application needs a communication
channel to interact with the Eclipse
EclipseStarter alludes to
start-up from a Servlet, but in practice it's a bit tricky for a few
1) A few of the VM's
singleton operations are called during initialization -- e.g.
URL.setURLStreamHandlerFactory. If these operations have already been called by
the servlet container (or another instance) the framework
2) System properties are
used for configuring the framework. This defeats the notion of independently
3) Can't access resources/classes on the servlet
classpath (by default the parent classloader is set to use the
Boot ClassLoader) You can use the System property
"osgi.parentClassloader=fwk" to force launching using the servlet classpath
however this dramatically reduces the modularity benefits of
The first two collectively
fall under work with the broader goal of "running independent instances of
Eclipse in the same VM".
The third is more a question
of having the facilities to save the launching application's classloader and then use
it selectively where desired (perhaps something like "Eclipse-BuddyPolicy: fwk"
if it existed.)
I'd be keen to contribute to an effort to resolve these
issues in the 3.2 time frame.
Is this work of interest to anyone
I have a prototype
(based on 3.1M7 - handles the first two issues) that I'd be willing to
polish and contribute to foster discussion.