apache-felix

Starting Wicket web application with OSGi HTTP Service

為{幸葍}努か 提交于 2019-12-29 08:07:12
问题 I'm trying to start a Wicket Application using Felix implementation of OSGi HTTP service, for that I just register the service using WicketServlet with applicationClassName parameter: props.put("applicationClassName", MainApplication.class.getName()); service = (HttpService)context.getService(httpReference); service.registerServlet("/", new WicketServlet(), props, null); I have also tried using Felix Whiteboard implementation and registering the web service as a Servlet one: props.put("alias"

Android embedded Felix missing requirement osgi.ee

对着背影说爱祢 提交于 2019-12-25 04:28:10
问题 I'm trying to convince an embedded Apache Felix on Android to start an external bundle. So far I have managed to embed the felix.jar into its own APK and run it as an activity. Within this activity I'm able to install outside bundles from jar files. Unfortunately whenever I try to move on and start one of these bundles I get the following error: Encountered exception when starting bundle: Unresolved constraint in bundle com.example.hellofelix [1]: Unable to resolve 1.0: missing requirement [1

Android embedded Felix missing requirement osgi.ee

血红的双手。 提交于 2019-12-25 04:28:08
问题 I'm trying to convince an embedded Apache Felix on Android to start an external bundle. So far I have managed to embed the felix.jar into its own APK and run it as an activity. Within this activity I'm able to install outside bundles from jar files. Unfortunately whenever I try to move on and start one of these bundles I get the following error: Encountered exception when starting bundle: Unresolved constraint in bundle com.example.hellofelix [1]: Unable to resolve 1.0: missing requirement [1

mangen adds 'Bundle-ManifestVersion: 1' to manifest, but felix doesn't seem to accept value 1

隐身守侯 提交于 2019-12-25 04:07:24
问题 I've used 'Mangen' to process my jar, which works but it adds the next line to the manifest Bundle-ManifestVersion: 1 after which Felix 1.8.0 complains with -> install file:D:/bundles/osgi_ds_1.jar.new.jar org.osgi.framework.BundleException: Unknown 'Bundle-ManifestVersion' value: 1 at org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:56) If I change the version manually to 2, Felix does install without error. But even if the manifest already contained

OSGi HTTP Bundle - Bind to two ports

拜拜、爱过 提交于 2019-12-24 13:16:12
问题 I'm using the Apache Felix HTTP Jetty bundle. I can start the servlet container / HttpService and assign it to a port using the system property org.osgi.service.http.port=8080 But I would like to have two such services, bound to two different ports, eg my application API should be served on 8080, but some static web pages should be served on port 80. How can I start the HTTP service a second time on a different port? When registering servlets, how can I know which service is bound to which

How to access the internal sun.security class from an OSGI bundle?

无人久伴 提交于 2019-12-24 04:31:55
问题 What options do I need to add to the maven build or the java runtime to access the internal sun.security classes? There is Java code from Akamai in an OSGI bundle needs access to internal sun.security classes. The Apache Felix console gives errors for the OSGI bundle: sun.awt.image.codec -- Cannot be resolved sun.io -- Cannot be resolved sun.misc -- Cannot be resolved sun.rmi.rmic -- Cannot be resolved sun.security.action -- Cannot be resolved sun.security.ec -- Cannot be resolved sun

Apache Felix: What are extension bundles?

自作多情 提交于 2019-12-24 01:36:35
问题 Apache Felix has the concept of an "extension bundle". This seems to be a bundle that contributes to the system bundle. There is also a special URL "felix://extensions/" being registered for them. When would I need to use extensions as opposed to regular bundles? Are there examples of bundles that use this approach? Is this a Felix-only feature or part of the OSGi spec? 回答1: according to the felix Implement extension bundles issue, extension bundles are described in section 3.15 of the OSGi

How to use org.apache.felix.scr annotations for a bundle from scratch?

耗尽温柔 提交于 2019-12-23 18:10:02
问题 I've started developing a bundle for apache felix and did so with the ops4j pax plugin. I've created the project structure with pax-create-project and in there did the normal pax-create-bundle . Then you get the initial project structure for building the whole thing with maven. The important part here is, that your bundle has it's own pom ( bundlename/pom.xml ) and bnd file ( bundlename/osgi.bnd ) but the configuration for maven-bundle-plugin is already provided under poms/compiled/pom.xml .

Programmatically adding declarative services

删除回忆录丶 提交于 2019-12-23 15:26:17
问题 Is it possible to add declarative services using some kind of api? A little background: I have a server application based on dynamic scripts (they can be added, edited or removed at any time). Those scripts have dependencies to OSGi services and possibly each other. Whenever a script gets edited, the script gets compiled to javascript, and its dependencies are detected. At that point, I'd like to (re)register it as a declarative service, so it will be activated / deactivated when its

Maven SCR Plugin - Not generating OSGI-INF folder

房东的猫 提交于 2019-12-23 10:26:19
问题 I have been having trouble getting my SCR plugin working. I have searched as much as I could bur only found examples that were not similar to the structure I am required to use. Snippets of POMs below. These are pretty much the default generated by the CQ project archetype. All dependencies are there, so it is probably not that. Here is the output of the build: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: