equinox

Including additional resources with OSGi bundles

白昼怎懂夜的黑 提交于 2019-12-30 05:02:06
问题 I'm working on an OSGi bundle which implements a service as a wrapper around a native executable. That is, the service runs the executable with ProcessBuilder , feeds it some data, and retrieves the result. My question is about the best way to package this bundle. The native executable includes a number of dependent data files which all must be present on disk for the tool to run. I've found plenty of references on dealing with native DLLs in OSGi, but none that address files associated with

Better handling of Thread Context ClassLoader in OSGi

为君一笑 提交于 2019-12-29 02:51:27
问题 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

Error after converting org.pbjar library to OSGi bundle

扶醉桌前 提交于 2019-12-25 07:09:03
问题 I'm trying to convert org.pbjar.jxlayer library to an OSGi bundle, I already succeeded in that but when I try to install it in Karaf container, the container claims that there is a missing requirement needed by this bundle: Unable to resolve 312.0: missing requirement [312.0] osgi.wiring.package; (osgi.wiring.package=com.sun.java.swing) I also put the javax.swing in the bundle import directive but the problem persists I changed the version of JDK (1.5, 1.6, 1.7) but no luck Can you help me

Equinox OSGi activating two versions of the same bundle

*爱你&永不变心* 提交于 2019-12-25 06:55:18
问题 I am looking for settung up my RCP and install all of the available applications on it. However; these applications have many internal and external dependencies such as. A -> B [1.0.0, 2.0.0) C -> B [2.0.0, 3.0.0) As a result in order to have both A and C installed on my RCP, I need both versions of B available and running. Assuming that B is not a singleton, what is the behavior of Equinox OSGI? In some places I read that OSGI will catch the latest version and loads that bundle. However, I

Eclipse 3.4 - external JARs with environment variables

半腔热情 提交于 2019-12-24 07:13:07
问题 I am developing a Plug-in for Lotus Notes (which is Eclipse 3.4) and need to rely on an external SDK/Connector for some Java dependencies and also Configuration files. It seems that in order to function properly, a file from the Connector installation folder has to be in the classpath. Since I don't know where it's installed, I have to rely on an environment variable that is set during installation ("IBMCMROOT"), which contains the folder. Is there any way to use Windows environment variables

Programmatically adding declarative services

删除回忆录丶 提交于 2019-12-23 15:26:17
问题 Is it possible to add declarative services using some kind of api? A little background: I have a server application based on dynamic scripts (they can be added, edited or removed at any time). Those scripts have dependencies to OSGi services and possibly each other. Whenever a script gets edited, the script gets compiled to javascript, and its dependencies are detected. At that point, I'd like to (re)register it as a declarative service, so it will be activated / deactivated when its

How to follow test first approach with Equinox/OSGi - Tycho - Eclipse RCP environment

僤鯓⒐⒋嵵緔 提交于 2019-12-23 12:27:38
问题 I joined a project where the development is carried on Eclipse RCP platform with the use of Equinox/OSGi, Tycho. I am slowly getting familiar with classpath/classloading mechanism of OSGi, how tycho, equinox works etc. I am writing plain unit tests with the use of mocking by collecting them in test bundles (which are fragments of the target bundles) however I am encountering ClassNotFound errors, issues with attaching source code. I have seen recommendations such as running tests as rcp

Best solution for using AOP with OSGI?

感情迁移 提交于 2019-12-23 12:24:14
问题 I am using Equinox, so the Equinox Aspect project seems like a no-brainer, but that project appears to be inactive and has only one page of documentation that leaves me hanging at the end. Other than that project, I do not see many options for using AOP in OSGI. Let me know what you all think and what the possibilities are, thanks :) 回答1: I don't know of any alternative, but I didn't think Equinox Aspects was inactive. It's even receiving new features in the upcoming Helios release. 回答2: The

ImageIO hangs when referred inside an OSGI Application Mac OS X - Java 1.7

﹥>﹥吖頭↗ 提交于 2019-12-22 10:36:11
问题 I am using Java 1.7 on Mac OS X 10.7.5 . It hangs the moment execution touches any ImageIO API. import javax.imageio.ImageIO; import org.eclipse.equinox.app.IApplication; import org.eclipse.equinox.app.IApplicationContext; public class ImageMain implements IApplication { @Override public Object start(IApplicationContext context) throws Exception { ImageIO.getCacheDirectory(); return IApplication.EXIT_OK; } @Override public void stop() { // TODO Auto-generated method stub } } jstack output :

Eclipse p2 : Difference between category.xml and site.xml

元气小坏坏 提交于 2019-12-22 04:10:20
问题 p2 repository creation ant tasks like eclipse.publish.featuresAndBundles seem to take a site.xml or category.xml file which specifies the category information. I see that the contents of site.xml and category.xml that eclipse generates are exactly the same right down to the tags. So what is the difference between the two? Edit - To be clear : What additions/subtractions are present in category.xml that differentiate it from a site.xml apart from the filenames? 回答1: The main difference between