osgi

Issues with GWT in OSGi+Pax-Web using Declarative Services

断了今生、忘了曾经 提交于 2019-12-07 14:18:20
问题 I'm migrating an existing GWT app running on OSGi (Equinox) and Pax-web to use Declarative Services instead of programmatic Service Tracker. I'm using Pax-Web in Equinox. A WAR-based GWT application is loaded with no problems by PAX-WEB War extender, but you cannot have Declarative Services in this modus operandis. I successfully refactored all servlets out of the war and converted them into declarative OSGi services ( <provide interface="javax.servlet.Servlet"/> ). That way I got rid of all

OSGi: passing parameters to a specific bundle

回眸只為那壹抹淺笑 提交于 2019-12-07 13:44:43
问题 I have a custom jar with a custom Main class, which starts the OSGi Framework and installs/starts the bundles. This main jar also includes a properties file. Goal: I have a bundle A which should pick up the properties of this properties file of the main jar somehow. My first attempt was to define a component in bundle A (using Apache Felix SCR/ Declarative Services) and retrieve the properties in its activate-method. This works so far that I'm getting the default value specified in the

How can list elements be looped under <script> in sightly?

二次信任 提交于 2019-12-07 13:15:36
问题 In my html page I would like to loop through the properties returned by my Java class but do it under <script> tag. Currently my html page has this: <div id="map_wrapper"> <div data-sly-use.ev="Foo" class="mapping" id="${ev.googleClass || ''" > </div> </div> <script> .... var markers = [ ['Bondi Beach', -33.890542, 151.274856], ['Coogee Beach', -33.923036, 151.259052], ['Cronulla Beach', -34.028249, 151.157507], ['Manly Beach', -33.80010128657071, 151.28747820854187], ['Maroubra Beach', -33

Configure Equinox to modify the management of the “local bundle cache”

只谈情不闲聊 提交于 2019-12-07 12:20:34
问题 Relating to a previous question, how let OSGi to reuse your configuration via Config Admin, I am still trying to solve this problem in the Equinox Framework. Pavol Juhos wrote: Equinox Config Admin (org.eclipse.equinox.cm) stores the configuration data in the persistent storage area provided by the Framework. And that happens to be the "local bundle cache" directory by default for Equinox. So i read up on this topic and found that there are several runtime options for Equinox (among other

View osgi bundles' dependencies?

余生颓废 提交于 2019-12-07 11:00:57
问题 I am looking for a tool in Eclipse that I can view graphically all osgi bundles' dependencies. Anyone has any ideas, please? 回答1: The STAN bundle and project dependency views are free add-ons. Here's a sample dependency graph: http://stan4j.com/images/stories/misc/plugin-deps.png Quick feature list: horizontal, vertical, narrow layout options node markers +/- indicate outgoing/incoming dependencies currently not shown double-clicking a node adds outgoing dependencies double-clicking a node

Runtime loading of Controllers for Spring MVC and dynamically mapping requests/URLs

北慕城南 提交于 2019-12-07 10:46:04
问题 We are starting a new project using Spring MVC, and we would like to move away from annotation-driven request/url mapping. We wish to implement the following use case: Use Case A User enters a URL. The request mapping handler retrieves a list of mappings (e.g. from the DB), and based on this dynamic list of mappings, it calls the relevant controller. This is because we want to be able to do the following as well: Use Case B We want to load a new Controller (perhaps a new reports module) into

Component camel-jsonpath gives error after adding to pom file

喜你入骨 提交于 2019-12-07 10:12:25
问题 In a clean Camel project I add the following dependency: <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-jsonpath</artifactId> <version>2.16.1</version> </dependency> When I run the project I get the below error. If I remove that dependency it works. I have tried this on two different projects and the same happens. Anything else that has to be added to the pom for jsonpath to work? It seems to complain for ASM? [INFO] Using org.apache.camel.test.blueprint.Main to initiate a

nullPointerException when trying to programmatically install a bundle in Equinox

旧城冷巷雨未停 提交于 2019-12-07 09:44:30
问题 I'm trying to do a simple demo where I start the Equinox Framework and then load a tutorial bundle that was created (via the tutorial). I keep getting NullPointerExceptions here is the stack trace... Exception in thread "main" java.lang.NullPointerException at org.eclipse.osgi.internal.baseadaptor.BaseStorageHook.mapLocationToURLConnection(BaseStorageHook.java:372) at org.eclipse.osgi.baseadaptor.BaseAdaptor.mapLocationToURLConnection(BaseAdaptor.java:185) at org.eclipse.osgi.framework

Constraints from the fragment conflict with the host

大兔子大兔子 提交于 2019-12-07 08:20:40
问题 I am trying to extend the imports of bundle A from bundle B using Fragment-Host. In bundle B I have this line: Fragment-Host: and in bundle B's Import-Package I have added the imports required by bundle A When I try to update bundle B with the manifest and start it I am getting the error: "Constraints from the fragment conflict with the host" with a list of all the imports exist in bundle B however when examining the Manifest of bundle A I don't see why these imports should conflict if they

Setting start levels & auto-start of Eclipse plug-ins: p2.inf vs product definition

依然范特西╮ 提交于 2019-12-07 07:31:07
问题 I know I can set start levels and auto-start flags for bundles in Eclipse using a p2.inf file or using a product definition file. Doing it in the product file gives me tooling support and puts the settings into my launch configuration. On the other hand, using the p2.inf file allows me to manage start levels on a per-feature basis which give me a nice grouping of start-level settings. Now my questions: What's the preferred way of defining start-levels and auto-start flags? p2.inf seems a bit