Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » How to consume OSGi based product outside OSGi container(I need tips and ideas about how to make use of OSGi based product (classes and resources) an outside OSGi container such as Spark.)
How to consume OSGi based product outside OSGi container [message #1811192] Wed, 28 August 2019 13:20 Go to next message
Regent LArcheveque is currently offline Regent LArchevequeFriend
Messages: 94
Registered: May 2010
Member
Hi,

I think this is the best forum to ask this type of question.

I'll try to make this as clear as possible.

Problem

  1. We are developing an RCP based app that needs to submit Spark Job.
  2. Spark master and workers do not exploit OSGi technology and are running on different servers.
  3. We must configure Spark and let it know about any extra classpath required to execute jobs. In our context, that means all the classes embedded in the RCP based product package (plugins/ directory + JARS embedded in the plugins if any).


Question
Is there a way or existing technique to extract all the classes defined and embedded in an RCP based application?

Thanks for your help. Any advice is appreciated.
Re: How to consume OSGi based product outside OSGi container [message #1811222 is a reply to message #1811192] Thu, 29 August 2019 03:00 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
I'm not sure there is an easier better way, but generally I look in the Package explorer to see what plugin dependencies any given plugin has, and that tells me its classpath that I would need to specify explicitly if I wanted this thing to run standalone.

Of course with EMF (which I know you use, though perhaps not in this case), it has many optional dependencies, so that further complicates the process of determine what's needed minimally to run stand alone.

I suppose some of this could be automated if you installed some helper plugin in the workspace and looked at each Java poject's resolved classpath, i.e., org.eclipse.jdt.core.IJavaProject.getResolvedClasspath(boolean).

Likely some Equinox expert has a better way and better advice.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to consume OSGi based product outside OSGi container [message #1811260 is a reply to message #1811222] Thu, 29 August 2019 15:49 Go to previous message
Regent LArcheveque is currently offline Regent LArchevequeFriend
Messages: 94
Registered: May 2010
Member
Ed, Thanks a lot for your reply.

I just implemented a similar strategy. The only difference is that I am using the OSGi framework to get all the OSGi installed bundle JARs and extract all the embedded JARs from the bundle manifest (Bundle-Classpath). The code is compact, efficient and It works as expected. This approach relies on OSGi only and does not depend on the Eclipse Resource framework.

Have a nice day ;-)
Previous Topic:How to consume OSGi based product outside OSGi container
Next Topic:Error when launching marketplace
Goto Forum:
  


Current Time: Sat Dec 21 14:22:51 GMT 2024

Powered by FUDForum. Page generated in 0.03641 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top