osgi

semantic versioning of API bundle

感情迁移 提交于 2019-12-10 10:53:01
问题 When starting with a package versioned at 1.0.0 in an API bundle, what should the new version be after adding a new interface to said package? The whitepaper makes this statement regarding compatibility: It should be obvious that binary compatibility plays an important role in backward compatibility. However, backward compatibility is also very dependent on the semantics. If the responsibility of an interface changes it could still be binary compatible but no longer be backward compatible. At

How should I implement the OSGi console into a Bundle?

给你一囗甜甜゛ 提交于 2019-12-10 10:48:14
问题 I'm new on OSGi and I'm trying to implement the osgi console into a bundle. I need to manage the other bundles/services from my bundle. So I need to be able to use the "ss", "install" and "unistall" commands at least on other services already installed or not. All this commands must be managed without human interaction, so I must to implement this into my application. This program will be installed on a uPC without a continuous monitoring. I've googled the way to implement the OSGi console

How do I register a service in OSGi (Apache Felix)?

浪尽此生 提交于 2019-12-10 10:41:43
问题 I have successfully managed to start Apache Felix from code and register an own Bundle. Following relation between OSGI-projects is needed: [OsgiInterface] -- provides interfaces. [OsgiModuleA] -- (bundle) provides an implementation of those interfaces. knows [OsgiInterface] [OsgiUsage] -- makes use of one or more bundle. knows [OsgiInterface] and [OsgiModuleA] Now I have problems registering a service which implements an interface. I would guess that my entries in manifest.mf files are wrong

correct way to turn EAR module into OSGI bundle

耗尽温柔 提交于 2019-12-10 10:25:19
问题 There is a necessity to turn part of EAR (namely - war) into OSGI bundle and retain it's interoperability. Glassfish 3.0.1 already has osgi-web-container module and I succeeded to deploy standalone OSGI war. But in case of of ex-enterprise war it looks a bit difficult to me. What do I do with EJB calls from inside future OSGI war? Is it enough to replace @EJB injections with true JNDI lookups? What about APIs and libraries shared across EAR? I could split and rearrange them, but still I will

How Apache Karaf sorts bundles to install and start?

青春壹個敷衍的年華 提交于 2019-12-10 10:05:18
问题 I have defined four bundles: bundle 1 : export package x version 1 bundle 2 : import package x ver [1,2] and export package y;y uses x bundle 3 : export package x version 2 bundle 4 : import package y and also import package x version 2 Using apache felix (distribuable binary), I found that I should manually impose to not resolve (or start) the bundle 1 and then bundle 2 before starting the bundle 3 (otherwise a uses constraint problem appears because bundle 2 will use package x version 1 and

Can not start eclipse due to org.eclipse.core.runtime

馋奶兔 提交于 2019-12-10 09:35:04
问题 I copied some plugins into my eclipse installation (specifically Green and ObjectAid from this answer). I deleted them (since it did not work) but now I can not get eclipse to start (even with eclipse -clean ). I get: !SESSION 2013-02-08 16:21:16.949 ----------------------------------------------- eclipse.buildId=M20110210-1200 java.version=1.6.0_29 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=el_GR Framework arguments: -product org.eclipse.epp

WebLogic and OSGi

久未见 提交于 2019-12-10 06:10:06
问题 Is there a way to run an OSGi container in the Weblogic Application Server? I know that it works with JBoss, Glassfish and there are possibilities to add an Equinox servlet bridge to your OSGi project (implementation of the bridge is too old). But I want something similar to JBoss/Glassfish functionality where it is very easy to deploy your OSGi environment, because there are already OSGi implementations. Most of the articels I found were very old and there are no more recent ones. Can

Quartz scheduler and OSGI

核能气质少年 提交于 2019-12-09 21:59:18
问题 I have an OSGI scheduler bundle that has the Quartz Scheduler Jar in it. This bundle exposes just an application interface to other bundles and, when a new job is registered, it is wrapped into a temporaryJob (that implements StatefulJob) and scheduled using the scheduler. In this way I don't have to expose Quartz Scheduler jar (that it is not so much osgi compliant). The problem with this approach is that, since StatefulJob avoids to execute job in parallel and I have only one actual job

Using JavaCompiler in an OSGi Bundle

懵懂的女人 提交于 2019-12-09 17:41:00
问题 I'm in the process of refactoring a Java application to use OSGi. One feature of the application is on-the-fly Java compilation using javax.tools.JavaCompiler . In the original application this process worked by feeding the compiler the existing classpath, like so. JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); String[] options = {"-classpath", System.getProperty("java.class.path")}; DiagnosticListener<JavaFileObject> listener = new DiagnosticListener<JavaFileObject>() {...};

OSGi and Maven detect use of private package

一笑奈何 提交于 2019-12-09 13:28:10
问题 I'm starting a project writing OSGi bundle and using Maven as the build management tool. My understanding is for an OSGi bundle you can choose which package you would like to keep private/public. Here is the question: If I am depending on a bundle that declares com.example package as exported package and declares com.example.internal as private package, is there any way, during build time, to detect use of com.example.internal (build should fail)? It would be awesome if that can be detected