osgi

Why can't JAXB find my jaxb.index when running inside Apache Felix?

本秂侑毒 提交于 2019-11-28 16:25:44
问题 It's right there, in the package that it should be indexing. Still, when I call JAXBContext jc = JAXBContext.newInstance("my.package.name"); I get a JAXBException saying that "my.package.name" doesnt contain ObjectFactory.class or jaxb.index although it does contain both. What does work, but isn't quite what I want, is JAXBContext jc = JAXBContext.newInstance(my.package.name.SomeClass.class); This question from various other people appears on quite some mailing lists and forums but seemingly

What is the difference between OSGi Components and Services

一世执手 提交于 2019-11-28 15:58:46
问题 Under OSGi, what are the main differences between Components vs Services? As I understand it, all Services must be Components, but not all Components must be services. What are the benefits of using one over the other with sample use cases? 回答1: "Components" are less formally defined than services. A service is any object that is registered in the OSGi Service Registry and can be looked up using its interface name(s). The only prerequisite is that a service should implement some interface...

What's the best way to get started with OSGI? [closed]

亡梦爱人 提交于 2019-11-28 15:30:58
问题 What makes a module/service/bit of application functionality a particularly good candidate for an OSGi module? I'm interested in using OSGi in my applications. We're a Java shop and we use Spring pretty extensively, so I'm leaning toward using Spring Dynamic Modules for OSGi(tm) Service Platforms. I'm looking for a good way to incorporate a little bit of OSGi into an application as a trial. Has anyone here used this or a similar OSGi technology? Are there any pitfalls? @Nicolas - Thanks, I've

How to modularize a JSF/Facelets/Spring application with OSGi?

我是研究僧i 提交于 2019-11-28 15:22:31
问题 I'm working with very large JSF/Facelets applications which use Spring for DI/bean management. My applications have modular structure and I'm currently looking for approaches to standardize the modularization. My goal is to compose a web application from a number of modules (possibly depending on each other). Each module may contain the following: Classes; Static resources (images, CSS, scripts); Facelet templates; Managed beans - Spring application contexts, with request, session and

Google Client API in OSGI

非 Y 不嫁゛ 提交于 2019-11-28 14:18:09
I'm having trouble providing the dependencies needed for OAuth Client Library for Java within an OSGI application framework (AEM). https://developers.google.com/api-client-library/java/google-oauth-java-client/setup I don't want to manually convert each dependency to an OSGI bundle, BND. So I'm using maven-bundle-plugin to embed these into my bundle. My process so far has been to watch the error.log for messages about 'Unresolved constraint in bundle.' Then track down the missing package, add the maven dependency, and add it to the Embed-Dependency section. That seemed to work for google-http

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

OSGi got FrameworkFactory could not be instantiated Error

人盡茶涼 提交于 2019-11-28 12:28:00
问题 I am trying to use OSGi and maven to develop an standard alone application. I have the following osgi dependency in pom.xml <dependency> <groupId>org.osgi</groupId> <artifactId>org.osgi.core</artifactId> <version>6.0.0</version> </dependency> I tried the following code import org.osgi.framework.launch.FrameworkFactory; FrameworkFactory frameworkFactory = ServiceLoader.load(FrameworkFactory.class).iterator().next(); and got this error message Exception in thread "main" java.util

Apache Maven Assembly Plugin not working with OSGi bundles

試著忘記壹切 提交于 2019-11-28 11:48:59
I have a Maven OSGi multi-module project. The project runs perfectly well when the OSGi picks the module jars from the individual project modules. (view 1.1.B below) . However, using a second approach, bundle.getRegisteredServices() (view 1.1.A below) returns null whenever I try using bundles deposited into a central folder (D:/parent/provider/target/modules) using the maven-assembly-plugin version : 2.6 : framework.getBundleContext().installBundle("file:D:/parent/provider/target/modules/OSGiDmHelloWorldProvider-1.0.jar"); framework.getBundleContext().installBundle("file:D:/parent/provider

Test Apache Felix with Java 8 and JavaFX

血红的双手。 提交于 2019-11-28 11:40:30
I'm working on example with JavaFX 2.2 and Java 8. I created this simple Apache Felix Activator: Activator: import javafx.application.Platform; import javafx.scene.Scene; import javafx.scene.control.Label; import javafx.scene.layout.BorderPane; import javafx.stage.Stage; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; public class Activator implements BundleActivator { Stage stage; @Override public void start(BundleContext context) throws Exception { Platform.runLater(new Runnable() { @Override public void run() { stage = new Stage(); BorderPane pane = new

How to compile mavenized OSGi 4.3 bundle with OpenJDK 7?

纵然是瞬间 提交于 2019-11-28 11:18:12
i am trying to compile my OSGi bundle against OSGi specification 4.3 using OpenJDK7 but i am getting error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5:compile (default-compile) on project example: Compilation failure [ERROR] /tmp/baka/example/src/main/java/org/example/Activator.java:[14,24] error: type ServiceReference does not take parameters here is my Activator.java: package org.example; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; public class Activator implements