osgi

How let OSGi (Config Admin) persist/reuse your configuration?

笑着哭i 提交于 2019-12-07 06:13:08
问题 I'm new to OSGi. My aim is to create a structure with the config admin, so you can enter a configuration, which will be reused after restarting the server. While I have read the api and tried some samples, I thought this feature will be included by default. My question to you: Is this possible at all and if yes: what have I to consider to get this functionality? PS. I'm using Equinox cheers chris 回答1: Configuration entered into Configuration Admin Service is persisted by default. However note

The default package '.' is not permitted by the Import-Package syntax

被刻印的时光 ゝ 提交于 2019-12-07 05:30:07
问题 Trying to run @org.junit.Test with Intellij IDEA. It's an OSGi bundle, when hit Run 'testMyTest' Getting following exception: Error:osgi: [b2b-bundle] The default package '.' is not permitted by the Import-Package syntax. This can be caused by compile errors in Eclipse because Eclipse creates valid class files regardless of compile errors. The following package(s) import from the default package null Could someone kindly share light on this exception? Thanks, Peter 回答1: You probably didn't

OSGi implementation for .NET

≡放荡痞女 提交于 2019-12-07 04:29:24
问题 Is there work on implementing a .NET version of the OSGi plugin architecture (or something similar)? I have only found this paper, but no real library. Any pointers? 回答1: I do not know much about OSGi, but you should take a look at Managed Extensibility Framework project. I believe it provides some subset of functionalities of OSGi. 回答2: Yes, there is a commercial product named UIOSP(XAUI Open Service Platform) which is the .NET implemented based-on OSGi specification R4 by a startup software

How to stop an OSGI Application from command line

让人想犯罪 __ 提交于 2019-12-07 04:04:05
问题 I do have a running osgi (equinox container) application. It will been started via a bash script. See felix gogo shell java -jar ... _osgi.jar -console 1234 & This all works pretty well and I also can stop it via telnet localhost 1234 <osgi>stop 0 But what I am looking for is how can I embed this into a bash script to stop the osgi application. I already tried this echo stop 0 | telnet localhost 1234 but this doesn't work. So if someone has idea how to put this in a bash script, please let me

Can't capture Apache Karaf client output

一个人想着一个人 提交于 2019-12-07 03:09:54
问题 I started Apache Karaf 3.0.0 in server mode using $KARAF_HOME/bin/start in CentOS 6.5. Then I wanted to run several commands using $KARAF_HOME/bin/client and also capture the output of these commands, so as to make sure the commands ran successfully. The output did get spit out on my console but I was never able to redirect it into a file. Seems like Karaf doesn't write anything to the output stream or error stream. I tried the following: [apache-karaf-3.0.0]$ ./bin/start clean [apache-karaf

What is the difference between bootdelegation and DynamicImport-Package in osgi

帅比萌擦擦* 提交于 2019-12-07 02:07:07
问题 Both will resolve package dependencies in osgi what is the difference between them 回答1: Bootdelegation is a hack that is needed because some code inside the VM assumed that application class loaders had visibility to com.sun.* classes. In OSGi, this is obviously NOT the case. Boot delegation is parameter that specifies for which packages the framework may do a lookup on the boot classpath. Since this is not modular, don't do it. It is global for the framework. DynamicImport-Package is similar

Get bundle classes of private packages in another bundle

℡╲_俬逩灬. 提交于 2019-12-07 01:03:27
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.listResources("/", "*.class", BundleWiring.LISTRESOURCES_RECURSE); List<String>

How to Open OSGi Console in Eclipse Juno?

▼魔方 西西 提交于 2019-12-07 00:31:39
问题 $ eclipse -console The above command opens OSGi console and Eclipse IDE in different windows. Is there any options where OSGi Console can be brought inside in console view of Eclipse? 回答1: Yes there is. Go to Run Configuration... in Eclipse. Double click on OSGi Framework will add a new Run Project for you. In the first view you can add all bundles you want to run. But for now deselect all and click on run. Then an OSGi console will be open in Eclipse. 回答2: You can just select the "Host OSGi

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

我是研究僧i 提交于 2019-12-06 22:26:34
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). So, I've downloaded the x86 build for the librxtxSerial library and I modified my folder structure in

Is it possible to create JKS keystore file without a password?

心已入冬 提交于 2019-12-06 21:42:49
问题 I'm experimenting with OSGi conditional permissions mechanism. More specifically, I'm trying to use org.osgi.service.condpermadmin.BundleSignerCondition to restrict which bundles can be started. Documentation I have states that in order to use this permission, I must specify the path to JKS keystores using org.osgi.framework.trust.repositories framework configuration property. However, the same documentation mentions that JKS mentioned in this property must not have a password. So the