osgi-bundle

Multiple references with the same name at maven-bundle-plugin

懵懂的女人 提交于 2021-02-10 18:11:46
问题 I'm using the maven-bundle-plugin 3.3.0 and OSGI R6. I have the following classes: //Class A @Component (immediate = true, service = {}) public class A{ private static B myB; @Reference (unbind = "unbindB") public static void bindB(B pB) { myB = pB; } public static void unbindB() { myB= null; } } //B class. It does not implement any interface. Hence, the service must be itself @Component (immediate = true, service = B.class) public class B{ @Activate public void activate(){ //B activated } }

How to deploy multiple processes(bundles) in 1 jar onto OSGI felix

拟墨画扇 提交于 2021-02-08 08:51:22
问题 I'm quite new to OSGI framework so I do not how to deploy multiple processes(bundles) in 1 jar onto it. Particularly, I have installed the Apache Felix With Web Console following this link. I have also tried to deploy my jar file and started it as the bundle. The jar's purpose is like a job to process some activities. However, I would like to have multiple jobs in just 1 jar file so that when I deploy that jar on Felix the framework can identifies and presents them as individual parts. For

OSGI Unresolved requirement: Import-Package: com.pi4j.io.gpio

天大地大妈咪最大 提交于 2020-06-27 08:55:22
问题 I want to write an OSGI Bundle (Eclipse SmartHome Binding) for the GPIO's of a Raspberry Pi. For the GPIO's i need to include the Pi4J libraries. I added them into a lib folder in my project folder and added the pi4j-core.jar to my Build Path. This is my code: /** * Copyright (c) 2014 openHAB UG (haftungsbeschraenkt) and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this

What is the intended use case for Bundle-Classpath in OSGI bundles

回眸只為那壹抹淺笑 提交于 2020-05-24 14:35:14
问题 I am trying to understand the intended use case for Bundle-Classpath in OSGI bundles. Here is my understanding, please help me understand if this is correct. Let's say I am working on creating an OSGI bundle which will be deployed in an ecosystem of other bundles. The bundle I am working on needs some other bundles, but they are not loaded/exported in this ecosystem, and I do not have control on what the ecosystem exports. In such a scenario, I can put these bundles inside some directory (say

Deploy multiple instance in 1 bundle OSGI

六眼飞鱼酱① 提交于 2020-04-30 06:24:31
问题 I want to deploy some jobs as instances in my jar (bundle) and when I deploy that jar onto Felix, maybe the Web Console can define the jar as 1 bundle but it could present these instances also. Moreover, I could do some bundle function on the instances like update/start/stop/... 来源: https://stackoverflow.com/questions/60808451/deploy-multiple-instance-in-1-bundle-osgi

Service and Component in OSGI

女生的网名这么多〃 提交于 2020-01-17 14:02:10
问题 I have some little silly doubts in an OSGI concepts but they need to be clarified to have better understanding of concepts. Can anybody tell me what is the difference between OSGI Service and Component. What i know is that Service is like an interface file in java that can be used either by a different service or by a component. While component is like a particular implementation of the service. Please let me know if i am wrong or suggest some link from where i can get the things nicely. 回答1:

Service and Component in OSGI

六眼飞鱼酱① 提交于 2020-01-17 14:02:09
问题 I have some little silly doubts in an OSGI concepts but they need to be clarified to have better understanding of concepts. Can anybody tell me what is the difference between OSGI Service and Component. What i know is that Service is like an interface file in java that can be used either by a different service or by a component. While component is like a particular implementation of the service. Please let me know if i am wrong or suggest some link from where i can get the things nicely. 回答1:

How to include resource file into osgi bundle from jar dependency with bnd/maven-bundle-plugin?

◇◆丶佛笑我妖孽 提交于 2020-01-13 11:33:32
问题 I'm using maven-bundle-plugin ( bnd effectively). It's straightforward to include a resource file from sources. For example, a resource file ( src/main/resources/some.xml ) is moved under target directory ( target/classes/some.xml ) during build time and can be included into the bundle using <Include-Resource> instruction: <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>3.0.1</version> <extensions>true</extensions> <configuration>

How to include a jar of dependency in an OSGi bundle using maven bundle plugin?

我们两清 提交于 2020-01-13 03:44:30
问题 I have an OSGi compliant bundle(jar), in which I want to add a jar of a dependency. The dependecy I want to add is of a Database Driver. That jar is not present in the lib folder of the Karaf container which I am using, and there is no way of adding it there manually. I have access only to the deploy folder, where I can deploy my bundles. I am using maven bundle plugin to package my bundle. So, I wanted to know whether there is a way to add the dependency jar in my bundle. Currently, I am