osgi

importing org.eclipse.core packages for Eclipse plug-in

こ雲淡風輕ζ 提交于 2020-01-13 04:28:10
问题 I'm trying to create a plug-in to mimic the Eclipse open resource dialog (CTRL+SHIFT+R). I've learned how to create a FilteredItemsSelectionDialog by following the example. But the missing piece is how to fill the dialog with the workspace resources. I found OpenResourceHandler and am trying to duplicate this functionality in my plug-in, so I can step through and see how it works. So I copy the source and rename it to avoid colliding with the real one. The problem is that I cannot import

Maven : OSGI, bundles and multi-modules projects

强颜欢笑 提交于 2020-01-12 13:57:07
问题 I'm currently developing an OSGi based application (using Equinox) by trying to mavenize a web tutorial I've found on OSGi+Equinox. In this project, there are bundles depending on other bundles (quote-service depends on quote). The compile phase does succeed, but the package phase does not. Maven complains the following : [INFO] [bundle:bundle] [ERROR] Error building bundle de.vogella.osgi:quote-service:bundle:0.0.1 : Unresolved references to [de.vogella.osgi.quote] by class(es) on the Bundle

Is there a pattern for dynamically loadable modules in Spring Boot?

若如初见. 提交于 2020-01-12 03:51:20
问题 My Spring Boot Application features a content management system. I would like to be able to dynamically load new components without requiring an application restart. An example component may be loading a new video player component or ad component. Each component would likely contain its own controllers and views. What would the recommended pattern be for this, and what is a good framework to help handle this? Is OSGi an option? 回答1: I'm afraid there isn't a 100% solution. There's maybe some

How to get a resource in another jar

末鹿安然 提交于 2020-01-11 06:15:13
问题 I have a jar embedded in a bundle that needs to fetch a resource packaged with it like so: MyBundle -\ src -\lib -\MyEmbeddedJar -\src -\SomeClass -\someResource.xml I am trying to access 'someResource.xml' from 'SomeClass' like so: SomeClass.class.getResource( "someResource.xml" ); But I've had no luck. I've tried several variations with the CWD appended (eg: './someResource.xml') but I just can't get this resource to load. I know that the "right" way is to use Activator to get hooks back to

How do you deserialize an object from bytes in osgi

放肆的年华 提交于 2020-01-11 04:45:09
问题 In my osgi application I have three bundles, travel.api , table.api and utils . travel.api depends on table.api which depends on utils . Note that travel.api doesn't directly depend on utils . I use aQute Bnd to generate the manifests and I believe it is working fine. The manifests are displayed below. There is a class called PageData that has a field of type TableData , which in turn has a field of type TestObject . PageData is located in travel.api , TableData is located in table.api and

Is Struts 2 available as an OSGi bundle?

两盒软妹~` 提交于 2020-01-11 03:29:08
问题 I have a server application that consists of multiple OSGi bundles, some mine, some third-party. One of the bundles provides a web frontend using Struts. The necessary Struts libraries live inside the web front-end bundle. Now I want to add a second bundle that provides another web front-end, with different dependencies and a very different use case. I want to use Struts for that bundle, too, but I don't want to put the same libraries into two bundles. With OSGi, it should be no problem to

How to discovering types exported by OSGi bundle without installing/activating?

自古美人都是妖i 提交于 2020-01-10 04:20:27
问题 Basically i want to discover if a jar implements any number of interfaces wihtout activating or starting the bundle. Is it possible to read the meta data from the meta-inf from an API just like the container does but without activating a bundle ? I want to use OSGi to support plugins of which numerous interfaces will be published and i would like to know which interfaces are implemented by a bundle when the user uploads without activating the bundle etc. 回答1: I do not think it is possible to

get Android permission dynamically

余生颓废 提交于 2020-01-10 03:03:30
问题 I'm wondering if it's possible to get Android permission dynamically without using AndroidManifest just with some codes, because I've some OSGi bundles running on Android and without Android permission they are restricted in functionality. Thanks for your answers, yes it complicates the user experience and it's also dangerous for the user if that mechanism is provided 回答1: No this is not possible. You can't alter the contents of an already installed APK. It would be very dangerous to allow

get Android permission dynamically

旧巷老猫 提交于 2020-01-10 03:03:18
问题 I'm wondering if it's possible to get Android permission dynamically without using AndroidManifest just with some codes, because I've some OSGi bundles running on Android and without Android permission they are restricted in functionality. Thanks for your answers, yes it complicates the user experience and it's also dangerous for the user if that mechanism is provided 回答1: No this is not possible. You can't alter the contents of an already installed APK. It would be very dangerous to allow

How to deploy Osgi Compendium Services in Karaf 4?

こ雲淡風輕ζ 提交于 2020-01-07 03:05:17
问题 I got this error when I tried to deploy a bundle that uses Compendium service: Error executing command: Unable to resolve root: missing requirement [root] ... osgi.wiring.package; filter:="(&(osgi.wiring.package=org.osgi.service.component)(version>=1.1.0) (!(version>=2.0.0)))"]] My bundle is configured so it uses: <dependency> <groupId>org.osgi</groupId> <artifactId>org.osgi.compendium</artifactId> <version>5.0.0</version> </dependency> And acording to karaf 4 depts documenation. Osgi