osgi

Eclipse OSGi bundle reqiure another bundle's fragment

孤者浪人 提交于 2019-11-28 05:01:12
问题 This might be simple question but have confused me for sometime. I'm developing an OSGi bundle which rely on google guice. Google guice has one main bundle and several fragment like assisted inject fragment. In my bundle I have used the assisted inject fragment and a class that is exported from that fragment. However in Eclipse, I can only set bundle dependency on another bundel (in this case, the guice bundle) but not directly on a fragment (assisted inject), hence Eclipse complains cannot

How to use OSGi fragments to contribute platform-dependent native code with the same filename?

坚强是说给别人听的谎言 提交于 2019-11-28 03:54:35
问题 I am using the JNotify project to listen to file system events. This depends on one native library per OS:processor architecture. For example, there's one library for Windows x86, one library for x86-64 etc. Monolithic bundle Originally, I had one bundle that contained both the JNotify Java classes and the native code. The native code were declared in Bundle-NativeCode as follows: (I've formatted these in the bnd style for better readibility... obviously the actual MANIFEST.MF files are

Apache Felix shell with SSH

时光怂恿深爱的人放手 提交于 2019-11-28 03:39:59
问题 I'm interested how I can use Apache Felix with SSH? I want to access Felix shell from remote computer using SSH. I know that there is a telnet support but it's too unsafe. Is there any solution? 回答1: Yes, there is one, as described here (the guide is relative to eclipse's equinox but it doesn't matter) using a combination of gogo shell, apache mina sshd server and three equinox console bundles (core+ssh plugin+jaas plugin for ssh authentication) you will be able to connect to mina's ssh

Full Android support for OSGi bundles [closed]

爷,独闯天下 提交于 2019-11-28 03:20:26
This topic explains how you can transform an OSGI framework to run on android. Then it gives tips to convert android packages as OSGI bundles capable of calling android API. At the current stage, the only thing these Android OSGI bundles cannot do is manipulate activities and use resources and assets. I am continuously working at fixing this limitation. I hope to have good news on this subject. I found more difficult to use the Create Plugin project facility in Eclipse than converting standard android packages as OSGI bundles so I won't talk much about it. You can keep track of my achievements

Java plugin framework choice [closed]

Deadly 提交于 2019-11-28 02:41:49
We're trying to determine how to implement a simple plugin framework for a service we are implementing that allows different types of calculators to be "plugged-in". After reading a number of posts about Java plugin frameworks, it seems like the most common options are: OSGI " Rolling your own " plugin framework The Java Plugin Framework (JPF) The Java Simple Plugin Framework (JSPF) OSGI seems to be more than we need. "Rolling your own" is ok but it would be nice to reuse a common library. So we're down to the JPF and JSPF. JPF doesn't seem to be in active development anymore. JSPF seems very

How do I use a Spring bean inside an OSGi bundle?

落爺英雄遲暮 提交于 2019-11-28 01:25:21
I have an application where I have to use Spring to load a bean based on some business conditions inside an OSGi bundle. This bean is not meant for export and is used for calculation inisde my bundle. Basically I have an actual service component, which is exported, and it has to use this Spring bean internally. But... When I use Spring DM the extender loads the application context in a seperate thread. How to access the context file inside my bundle? How to make sure extender thread finshes loading application context so that i can use it in my bundle? I don't want to export the application

What is the standard way to bundle OSGi dependent libraries?

早过忘川 提交于 2019-11-28 00:18:16
I have a project that references a number of open source libraries, some new, some not so new. That said, they are all stable and I wish to stick with my chosen versions until I have time to migrate to the newer versions (I tested hsqldb 2.0 yesterday and it contains many api changes). One of the libraries I have wish to embed is Jasper Reports, but as you all surely know, it comes with a mountain of supporting jar files and I have only need a subset of the mountain (known) therefore I am planning to custom bundle all of my dependant libraries. So: Does everyone custom-make their own OSGi

Equinox start error (console bundle is missed)

匆匆过客 提交于 2019-11-27 21:36:24
java.version=1.6.0_10 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments: -console -configuration runtime ENTRY org.eclipse.osgi 4 0 2012-03-28 15:50:09.721 !MESSAGE Could not find bundle: org.eclipse.equinox.console !STACK 0`enter code here` org.osgi.framework.BundleException: Could not find bundle: org.eclipse.equinox.console at org.eclipse.osgi.framework.internal.core.ConsoleManager.checkForConsoleBundle(ConsoleManager.java:211) at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:297) at org

How to start osgi console (Equinox)

空扰寡人 提交于 2019-11-27 21:22:23
I'm trying to start an OSGi console in Windows 7. I used this statement on a terminal window: java -jar org.eclipse.osgi.jar -console But it doesn't work that is nothing does happen nor doesn't appear prompt osgi> . And typing on keyboard is ineffective except for ^C that makes to reappear usual terminal prompt. Anyone has any suggestion? Starting from Equinox 3.8.0.M4, it has a new console. So you need also these four bundles for it to run properly. org.eclipse.equinox.console.jar org.apache.felix.gogo.shell.jar org.apache.felix.gogo.command.jar org.apache.felix.gogo.runtime.jar These jar

No access to Bundle Resource/File (OSGi)

二次信任 提交于 2019-11-27 20:16:14
at the moment i'm developing an OSGi based WebApp with Jetty and Equinox (see: http://wiki.eclipse.org/Jetty/Tutorial/EclipseRT-Jetty-Starter-Kit ). Everything ist fine so far but i can't get access to some files/resources of my own bundle . The location/path is "configuration/data/config.csv" and "configuration/data/data.zip". I have tested everything: context.getBundleContext().getBundle().getEntry("config.csv"); context.getBundleContext().getBundle().getResource("config.csv"); this.getClass().getClassLoader().getResource("config.csv"); context.getBundleContext().getDataFile("config.csv");