osgi

How to override bnd Require-Capability generated from DS annotation?

半世苍凉 提交于 2019-12-24 05:49:26
问题 I have a bundle with an "optional" Component : It should be started if at leat one service of type X exist, and deactivated when the last service is unregistered. This component is "optional": It doesn't matter if X is registered or not, or if my component is activated or not. It's just an helper for managing instances of X. My component is declared like this : @Component public class MyManager { @Reference(cardinality=AT_LEAST_ONE) public void addService(X service) { .. } } However, bnd

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

JAX-WS fails to unmarshal in an OSGI environment

独自空忆成欢 提交于 2019-12-24 03:59:23
问题 I've been tasked with updating a plugin for Cytoscape, a biological visualization software platform, to the latest version of the Cytoscape API. Cytoscape 3.x uses an OSGI framework (Karaf 2.2.x, I think) to interface with its plugins (which are now called "apps"). The plugin/app is actually a client that uses JAX-WS to communicate with an external server. But for some reason, despite the absence of any error messages, it fails to unmarshal the SOAP messages that it's getting. The desired

ServiceBus JAVA SDK advanced reloading errors, ServiceLoader (not subtype)

血红的双手。 提交于 2019-12-24 02:59:20
问题 I have an OSGi environment running some bundles, one of them uses Service Bus API (Azure Java SDK v 0.4.4) and there are some errors after I reload my OSGi environment. The workflow is this: Initialize the JVM and the OSGi framework Bundles are loaded and started Service Bus bundle creates a Configuration using "ServiceBusConfiguration.configureWithWrapAuthentication(v,w,x,y,z)" call and everything runs smoothly I programmatically restart the OSGi framework and then all bundles are loaded and

How can I merge multiple OSGi bundles with BND / Maven-BND-plugin?

别说谁变了你拦得住时间么 提交于 2019-12-24 01:56:05
问题 I'm using some off-the-shelf OSGi bundles in my application and would like to repackage them together with additional packages that are not yet OSGi compatible into a new bundle. Case in point is EclipseLink, which is available as several OSGi bundles, most of which are optional, depending on what you want to do. I want to pick those bundles that are relevant for me, add database drivers (for example the MySQl JDBC connector) and repackage them into a new bundle that is easier to deploy. I'm

How to copy a resource directory and all included files and sub-folders in a Jar onto another directory

丶灬走出姿态 提交于 2019-12-24 01:44:29
问题 Is it possible to copy a resource folder, and all the files within, including all directories and sub directories therein into another directory? What I've managed so far is to copy only one file resource, which is a CSS file: public void addCSS() { Bundle bundle = FrameworkUtil.getBundle(this.getClass()); Bundle[] bArray = bundle.getBundleContext().getBundles(); Bundle cssBundle = null; for (Bundle b : bArray) { if (b.getSymbolicName().equals("mainscreen")) { cssBundle = b; break; } }

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

MATLAB finds persistence.xml for eclipselink only within the first few seconds

核能气质少年 提交于 2019-12-24 01:09:05
问题 This is a continuation of the issue described in Using eclipselink in Java code run from MATLAB and is similar to the issue described in Java JPA Class for MATLAB, but the accepted solutions described there have not completely solved the issue. I am trying to use eclipselink to connect to an oracle database in matlab. From the answers in the previous posts, I put the code on the static classpath (in the classpath.txt). When I do this I am able to use it, but only if I create the EntityManager

BndTools, How to add a non-OSGi JAR?

隐身守侯 提交于 2019-12-24 00:59:22
问题 BndTools, How to add a non-OSGi JAR? I wanted to add jcraft Libraries into my osgi project. Using plain JAR breaks the whole project. Missing requirement wiring package ERROR: Bundle com.herle.iiot.application.installation [6] Error starting file:/D:/HERLE/Data/iot-sdk/FelixLauncher/bundle/com.herle.iiot.application.installation-1.5.0.jar (org.osgi.framework.BundleException: Unable to resolve com.herle.iiot.application.installation [6](R 6.0): missing requirement [com.herle.iiot.application

Interacting Non osgi with osgi bundles

二次信任 提交于 2019-12-23 20:21:58
问题 I am using struts2 for my web application and i want to use osgi architecture for service and dao layer. Now I dont want to wrap my struts2 actions as osgi bundles but want service and dao layer to be packaged as bundles. Now can anybody tell me how my non osgi actions can consume osgi bundles(service and dao layer). And I want to deploy my struts2 web application in web container so how web container will interact with osgi container(where my service and dao is deployed) in this case .