osgi

import package without edit the manifest file in org.restlet

一笑奈何 提交于 2019-12-08 09:18:37
问题 I am using Restlet for my communication between my clients (JSE2) and my server(GAE). The clients are OSGi based. I have a shared bundle containing my resource interfaces and a bundle containing the code to wrap a resource to a ClientResource. But the org.restlet bundle doesn't import any of these bundles. I think its not the right solution to edit the manifest of the org.restlet bundle and import the shared bundle manualy. Also this is a very static solution. Is there a beter way to import

What are the non-osgi targets with which Apache ACE can work

◇◆丶佛笑我妖孽 提交于 2019-12-08 08:20:26
问题 Apache Ace documentation refers that it can do software provisioning to other types of targets "non-OSGi containers, or something completely different target". But no documentation is available regarding non-OSGi target. Can I have some examples of non-OSGi targets to which Apache Ace can do software provisioning. Also, what are the minimum requirement for a target to work with Apache ACE. Thanks 回答1: Some examples of non-OSGi targets that I have seen people create are: Android applications

OSGI Bundle-NativeCode give error “No match found for native code”

故事扮演 提交于 2019-12-08 08:14:21
问题 I'm developing an OSGI bundle which uses the native library librxtxSerial . The first time, I had to deploy this bundle on a raspberry, so I've did something like that: I put the native library under: lib/librxtxSerial.so (NB: INSIDE the java project). Then, in the MANIFEST I've wrote: Bundle-NativeCode: lib/librxtxSerial.so Everything works fine!!! Now, the problem is that I've to deploy the same bundle on other embedded device which uses a different processor architecture (x86 instead ARM).

Order of service binding with declarative services

江枫思渺然 提交于 2019-12-08 07:32:56
问题 Is there a way to find out or to determine the order of service binding with declarative services? My problem is that I have a logging service running in my OSGI among other services. Now, my component binds this logging service and a couple of other services. I want to write a log message each time a service is bound or unbound. However, if service A is bound before my logging service, no log entry for A can be written. Can I configure the binding order somehow? I read about setting the

Get bundle classes of private packages in another bundle

痞子三分冷 提交于 2019-12-08 07:12:48
问题 I have two osgi bundles A and B. All packages of bundle A are private. In bundle B I used the code from https://stackoverflow.com/a/22800118/5057736: BundleA class ClassA extends ClassB{ ClassA(){ super(ClassA.class); } } Bundle B class ClassB{ ... public void doFoo(){ { Bundle bundle = FrameworkUtil.getBundle(ClassAReference); BundleWiring bundleWiring = bundle.adapt(BundleWiring.class); // Getting all the class files (also from imported packages) Collection<String> resources = bundleWiring

Deploy exploded bundle to Apache Felix using an Eclipse launch task

♀尐吖头ヾ 提交于 2019-12-08 06:49:48
问题 I am looking for a way to (re)deploy an exploded bundle (meaning not jarred but in a folder) to a running Apache Felix OSGi container from within Eclipse, preferably using a launch task. I found this question, which has an answer that comes close but it depends on typing commands into a Gogo shell, which is not convenient for long-term development use. I'd like to use Eclipse's launch task mechanism for this, but if there are alternatives that are equally fast and convenient I am open to that

Equinox java.lang.NoClassDefFoundError

故事扮演 提交于 2019-12-08 06:29:43
问题 I am running a very simple osgi bundle whose activator looks like this public void start(BundleContext bundleContext) throws Exception { JAXBContext con = JAXBContext.newInstance(Activator.class); } This always throws exception org.osgi.framework.BundleException: Exception in com.test.bundle.Activator.start() of bundle com.test.bundle. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734) at org.eclipse.osgi.framework.internal.core

OSGI framework hangs when loading native library

孤者浪人 提交于 2019-12-08 06:03:37
问题 Situation: Open source OSGI framework SMILA (http://www.eclipse.org/smila/) started as Windows Service with the aid of Apache commons-daemon (http://commons.apache.org/daemon/). Trying to load a DLL via System.loadLibrary() from OSGI bundle while Manifest.mf includes Bundle-NativeCode: path/to/dll . Environment: Windows Server 2003, Java 1.6 Error: During the invocation of System.loadLibrary() the complete Java process hangs. When the service is stopped System.loadLibrary() finish and code

OSGi noClassDefFound for java.nio.files.FileSystems$DefaultFileSystemHolder

非 Y 不嫁゛ 提交于 2019-12-08 04:26:32
问题 in our application, we're using ini files for the configuration of our OSGi apps. Now I thought about adding a WatchService to detect changes and reload the modified file if necessary. I found multiple tutorials so far. Most of them are similar and result in something like the following: http://java.dzone.com/news/how-watch-file-system-changes. I adopted it like this: 36: public Ini(final File file) throws IOException { if (!file.exists()) { throw new IOException("Ini-File does not exist.");

Download Java EE API JARs as OSGI bundles

◇◆丶佛笑我妖孽 提交于 2019-12-08 03:44:25
Is there a place where I can download Java EE API JARs as OSGi bundles? I don't know of anywhere where you can do that, but you can wrap the jars and deploy them as bundles with the wrap scheme . So the command that you would want to use to pull them from maven and wrap them as bundles would be osgi:install -s wrap:mvn:javax/javaee-api/6.0 . Apache Geronimo produces API jars for the Java EE packages and they are all (at least all the ones I've used) OSGi bundles. They are all installed in maven central. You can search for them in maven central here and either download them for use outside