equinox

Integrating Equinox OSGi into Apache Tomcat web app

流过昼夜 提交于 2019-11-30 04:56:59
问题 Is it possible to introduce osgi-equinox into existing java Apache Tomcat project? From my understanding OSGI must run inside some kind of "container". How would I integrate it? I am also using Jersey for RESTful resources. 回答1: You may want to look at this question: OSGI runtime inside traditional Java EE server. In this bridge model, a special servlet is installed and Tomcat invokes this servlet to handle the request. An OSGi runtime is spawned from within this servlet, but the OSGi runtime

Can Eclipse 3.5 discover all bundles in the plugins dir?

六眼飞鱼酱① 提交于 2019-11-30 03:13:31
问题 Simple usecase : assemble an Eclipse product using simple scripts, just dumping bundles into the plugins dir . This used to work with 3.3 - with 3.5 it's broken: my application doesn't start as the app plugin is not found. Question : what's the easiest way to fix that? This seems to be the only pain in the whole upgrade process for me. Attempts : I guess this is a no-no for P2: it maintains the bundles.info file instead, which is probably very smart.. a bit too smart for me. Some ideas I had:

How to convert old “plugin.xml” to new “manifest.mf” file?

纵然是瞬间 提交于 2019-11-29 12:48:11
How to convert plugin.xml file to manifest.mf file as some tags like: <runtime> <library name="aaa.jar"> <export name="*"/> </library> <runtime> are seems to be ignored. Here is some correspondence in the next document, but far from complete reference. http://www.eclipse.org/eclipse/platform-core/runtime/adoption.html Open the file in the plugin.xml editor. On the Overview Tab>Plug-in Content section there should be a link, " ..., create an OSGi manifest " The OSGi manifest is a set of headers describing the bundle, the bundles or packages that are dependencies, and the packages this bundle

Eclipse RCP: Target platform - Eclipse vs. Equinox?

Deadly 提交于 2019-11-29 07:05:24
I'm just starting with OSGi and Eclipse RCP. Could someone explain to me the difference between "Eclipse" and "Equinox" as the target platform, when creating a new eclipse plugin project? I still know that Equinox is Eclipse's implementation of OSGi. I read in some articles that eclipse rcp is also based on Equinox. So where is the difference between the target platform you have to choose in a new Eclipse Plugin Project? Best regards It is about the environement in which the module you will be creating will run: see this Vogalla's RCP Tutorial Vogella's OSGi with Eclipse Equinox Eclipse

Which version of OSGi is implemented by which version of Eclipse/Equinox?

大憨熊 提交于 2019-11-29 02:16:43
问题 We are looking for a table which matches Eclipse/Equinox release versions to the corresponding OSGi Service Platform specification release version. Eclipse/Equinox wiki doesn't have any info on this in a structured form. 回答1: The release archaeology is quite hard. So far we have these versions collected: Year | Eclipse | Release | OSGi spec | Equinox implementation version | version | name | version | org.eclipse.osgi | org.eclipse.osgi.services -----|---------|----------|-----------|--------

How to get classloader for a bundle in equinox?

≡放荡痞女 提交于 2019-11-29 01:33:49
I have read a lot of equinox code for this, but still can't figure out a non-hacky way of getting the classloader for a osgi bundle in eclipse equinox setup. Is there one? The short answer (certainly for OSGi 4.1, not sure of 4.2) is you can't get a bundle's classloader. However the Bundle interface exposes a loadClass() method and this would allow you to write a classloader that wraps the bundle API and delegates to that loadClass() method. Or you can save some time and use Spring DM's BundleDelegatingClassLoader class instead. Balazs Zsoldos In OSGi 4.3 you can use: bundle.adapt(BundleWiring

Trouble understanding the whole OSGi web eco system

一世执手 提交于 2019-11-28 17:03:15
I am pretty new to the whole Java and OSGi world and I have trouble understanding the eco system of a OSGi web application. To be more precise I am at the moment trying to understand how all the parts of the eco system are related to each other: OSGi Framework (e.g. Apache Felix, Equinox, Knoplerfish) OSGi Runtime (e.g. Spring DM Server, Pax Runner, Apache Karaf) Web Extender (e.g. Pax Web Extender, Spring Web Extender) Web Container (e.g. Apache Tomcat, Jetty) To give you a visual representation of my actual understanding of their relationship check out this image: As far as I know the OSGi

Better handling of Thread Context ClassLoader in OSGi

こ雲淡風輕ζ 提交于 2019-11-28 16:52:08
I've been using OSGi for a while now and I have various solutions to the problems I encountered. I wanted to revisit one of these and see if people had come up with different solutions. One of the most common issues I have with OSGi (Equinox 3.4.2) is the frequent unavailability of the Thread's context ClassLoader. I know this is partly an Equinox problem, but I have encountered the issue with Felix as well. I encounter this mostly with 3rd party libraries that start their own Threads or ThreadPools. When these are started during Bundle or DS activation, they can end up without their

java.util.NoSuchElementException while starting an OSGi framework programatically

一世执手 提交于 2019-11-28 14:17:53
I am trying to programatically start an OSGi framework (preferably Equinox) from Java and then load up any bundles. So I was going through this article which says how to do that. But I am getting java.util.NoSuchElementException everytime at the below line everytime ServiceLoader.load(FrameworkFactory.class).iterator().next(); Below is the code- import java.io.File; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; import java.util.ServiceLoader; import java.util.logging.Logger; import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; import org

Start an osgi bundle failed with Require-Bundle: org.eclipse.core.runtime; bundle-version=“0.0.0”

北战南征 提交于 2019-11-28 10:52:17
问题 I'm trying to install and load an external bundle to a simple equinox application. The targeted bundle is coming from a set of plugins for eclipse available here: http://sourceforge.net/projects/rodin-b-sharp/files/Core_Rodin_Platform/2.4/ ( rodin-2.4-dev.zip ). When I start equinox: $ java -jar org.eclipse.osgi_3.7.1.R37x_v20110808-1106.jar -console I can install it osgi> install file:///path_to/rodin-2.4-dev/org.eventb.core_2.4.0.r14093.jar Bundle id is 1 But I have an exception when I