Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: Re[2]: [platform-core-dev] Can I use EclipsePlatform Corefunctionality outside Eclipse?

I think even if we strip the extension registry out of the runtime, we still need to worry about OSGi layer. In order to use plug-ins outside Eclipse, the application should be able to:
 
1. Parse the plugin.xml. Generate and manage the extension registry.
2. Create class by using the information in the extension registry.
 
In Eclipse, #1 is implemented by org.eclipse.core.runtime, while #2 is implemented by OSGi layer. So, even if we can do #1, we still need to somehow implement #2, which involves bundle management and classloading, and seems to be more complicated.
 
For #2, do you have any suggestion?
 
Even though we can write our own code to load the class (basically by extending the URLClassLoader class), the functionality would be much limited compared with Eclipse's OSGi code. I'm not familiar with OSGi, I don't know whether it's enough if we only implement loadClass function (for ConfigurationElement). What other functionality we need to implement? 
 
If we can use Eclipse standalone OSGi framework as suggested by Glyn, this part will be much easier. But I'm not sure if the standalone OSGi requires a separate classloader. If the standalone OSGi and the main Java application can be in the same classloader, things will be easier and our solution would be:
 
1. Create the standalone OSGi framework in the main Java application. The OSGi framework and the main Java application will be in the same class loader. If so, the main application can access the OSGi framework directly.
2. Copy Eclipse's extension point related logic into the Java application. Notice that the extension related code will call the standalone OSGi framework if necessary. (In fact, since we have the OSGi, is it possible for us to use org.eclipse.core.runtime directly instead of copying the logic?)
 
Can anyone make sure if the standalone OSGi and the main Java application can be in the SAME classloader?
 
By the way, do you guys have any internal design documents which talk about the architecture of org.eclipse.osgi and org.eclipse.core.runtime? I realize I need to fully understand them before I start to work. I would appreciate it a lot if you guys could send me some documents.
 
Thanks,
Kai 


From: platform-core-dev-bounces@xxxxxxxxxxx [mailto:platform-core-dev-bounces@xxxxxxxxxxx] On Behalf Of Jeff McAffer
Sent: Thursday, April 14, 2005 6:33 AM
To: Eclipse Platform Core component developers list.
Subject: RE: Re[2]: [platform-core-dev] Can I use EclipsePlatform Corefunctionality outside Eclipse?


Kai,

Yes to all.  Keep in mind my earlier comment that the extension registry is quite independent of OSGi.  The goal here would be to have the extension registry out there as a completely stand-alone piece.  I don't quite think that what you are proposing will work well.  OSGi expects to be "on top" and create classloaders for everything.  You can "start" OSGi from you Java application but interacting with it will be a challenging exercise in reflective programming.  

I suggest you look at stripping the extension registry out of the runtime and using it standalone.  If you do that, please contribute your experiences back. This is definitely something that we want to look at doing.

Jeff



"Kai Shen" <kshen@xxxxxxxxxxx>
Sent by: platform-core-dev-bounces@xxxxxxxxxxx

04/13/2005 06:26 PM

Please respond to
"Eclipse Platform Core component developers list."

To
"Eclipse Platform Core component developers list." <platform-core-dev@xxxxxxxxxxx>, "Glyn Normington" <glyn_normington@xxxxxxxxxx>
cc
Subject
RE: Re[2]: [platform-core-dev] Can I use Eclipse Platform        Corefunctionality outside Eclipse?





Follow Glyn's link, I found Equinox Framework Layering. Hey, Glyn, you
guys are doing something really cool!

It's nice to be able to run Eclipse OSGi framework stand alone. I guess
then I can start the OSGi framework in the main Java program without
having to start another classloader, right? I understand the Eclipse
runtime platform depends on the OSGi framework. If I can start the OSGi
framework stand alone, can I continue to start Eclipse runtime platform?
We'd like to use Eclipse's extension management mechanism (e.g.
ExtensionRegistry, etc.) in the main Java program.

In my opinion, OSGi and org.eclipse.core.runtime are the base of
Eclipse, logically they don't depend on other plug-ins in Eclipse. If we
can make OSGi and core.runtime a standalone component, it will be
wonderful, because then this kernel part (Let's call it "Eclipse
Extension Framework") can be used widely in other Java applications that
want to use Eclipse's extension mechanism. When people develop their
Java application (either server or client app), they can leave some
extension points in their application and let others to contribute
plug-ins. Other people can use Eclipse to develop their plug-ins. And
the main application will use the "Eclipse Extension Framework" to
handle those plug-ins (including bundle management, classloading and
extension point management, etc). Doesn't it sound great?

Anyway, it's just my thought when I was reading the responses. Thanks
everyone for participating in this discussion.

Kai

-----Original Message-----
From: platform-core-dev-bounces@xxxxxxxxxxx
[mailto:platform-core-dev-bounces@xxxxxxxxxxx]

GN> Hi Kai,

GN> It's possible to run the Eclipse OSGi framework stand alone ([1]).
GN> However, I suspect the framework calls the "one shot"
GN> java.net.URL.setURLStreamHandlerFactory, which I gather conflicts
GN> with your server code.

GN> Glyn

GN> [1]
GN> http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/equinox-home
GN> /layering/standalone.html

GN> Telephone: +44-(0)1962-815826. Email: glyn_normington@xxxxxxxxxx

GN> _______________________________________________
GN> platform-core-dev mailing list
GN> platform-core-dev@xxxxxxxxxxx
GN> https://dev.eclipse.org/mailman/listinfo/platform-core-dev
_______________________________________________
platform-core-dev mailing list
platform-core-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-core-dev


Back to the top