osgi

OSGi Application Patching Strategy

。_饼干妹妹 提交于 2019-12-22 13:47:08
问题 What are appropriate mechanisms for patching an OSGi container. 1) Should the bundles (binaries/jars) have the same name as the old ones then: a. Replace the bundle with the with the new bundle (manifest has been modified to reflect the new version) in the plug-ins folder and, b. Invoke update <bundle id> <bundle name>. 2) Or Should the bundles have version information encoded in the file name a. Copy the new bundle to the plug-ins folder b. Invoke update <bundle id> file:plugins/<new Bundle

Dependency chain conflicts for Hibernate and Apache Felix

删除回忆录丶 提交于 2019-12-22 11:37:39
问题 I understand the concept of OSGi complaining about multiple dependency chains - a package is available more than once and when the importing bundle doesn't specify exactly which version it needs, so the OSGi container can run into the trouble of not knowing what to provide. Unfortunately I ran into such a problem this week, but both involved bundles are third party bundles, so I can't really influence their imports and exports. Here are the two error messages I get: org.osgi.framework

Passing arguments to OSGi application

牧云@^-^@ 提交于 2019-12-22 10:36:59
问题 I'm in a team that is converting a suite of Java applications to use OSGi. Previously, we used our own home-brew class loader system that has some similarities to OSGi, but it was nothing but trouble; we expect that by moving to using a system like Apache Felix we can have a system that works better while requiring less overall effort on our part to support. We have been converting the modules that make up the applications into OSGi bundles, a largely painless affair with the use of Spring DM

ImageIO hangs when referred inside an OSGI Application Mac OS X - Java 1.7

﹥>﹥吖頭↗ 提交于 2019-12-22 10:36:11
问题 I am using Java 1.7 on Mac OS X 10.7.5 . It hangs the moment execution touches any ImageIO API. import javax.imageio.ImageIO; import org.eclipse.equinox.app.IApplication; import org.eclipse.equinox.app.IApplicationContext; public class ImageMain implements IApplication { @Override public Object start(IApplicationContext context) throws Exception { ImageIO.getCacheDirectory(); return IApplication.EXIT_OK; } @Override public void stop() { // TODO Auto-generated method stub } } jstack output :

OSGi: Having the same Package path in two different Bundles

断了今生、忘了曾经 提交于 2019-12-22 08:55:28
问题 I got a bundle1 that has the following packages: com.anderson.servlet.osgi (exported) com.anderson.servlet com.anderson.util (exported) and a second one, bundle2 , that looks like this: com.anderson.jetty com.anderson.servlet.osgi and I also import com.anderson.servlet.osgi from bundle1 . Is it possible to merge both packages in bundle2 ? 回答1: No. If you import a package, that takes precedence over a private package with the same name that you may happen to have inside your bundle. Why not

OSGi application design - am I abusing the service framework? [closed]

巧了我就是萌 提交于 2019-12-22 08:45:03
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed last year . In an application we're developing I have a common interface for data provider components to implement, and I'm hooking these providers up as services. One of my colleagues suggested it might be better to just create one service that can keep track of these implementations (how

Eclipse RCP 4 use bundle via declarative service

断了今生、忘了曾经 提交于 2019-12-22 06:55:33
问题 I have written an OSGi bundle to use it in my eclipse 4 rcp application. The usage of the service works fine if I add the dependencies, register these service in my activator and inject it in my class. In activator IUserService service = new TestUserService(); context.registerService(IUserService.class.getName(), service, null); In my class @Inject IUserService service; service.getSth(); I read that using bundles via declarative services should be the better way. So changed my implementation.

Eclipse plugin bundle stuck in Starting state

北城以北 提交于 2019-12-22 06:49:28
问题 I used Eclipse to create a new plug-in project which created a default Activator for me. When debugging (running as Eclipse Application) I noticed the start() and stop() methods of this activator weren't called. Following the guide on what to do when your bundle isn't visible in Eclipse I stumbled upon the following results. Using the ss command, I can see my bundle listed. The status of my bundle is 'Starting' The bundle is in the process of starting. A bundle is in the STARTING state when

difference between WAB and WAR

廉价感情. 提交于 2019-12-22 05:05:39
问题 I am a newbie to this and read about WABs , but wish to clear the basic difference - I mean using osgi embedded in tomcat and making a WAR vs making a WAB ? When should one consider each option ? 1) OSGI embedded in tomcat 2) tomcat in OSGI 3) using a WAB 回答1: OSGi embedded in a container (not only Tomcat!) is likely the only option when you are forced to a traditional JavaEE WAR deployment model, i.e. an IT department operates the container and you can only deloy WAR files to it. This

Trying to build an OSGi bundle in Maven with embedded dependencies. Can't seem to exclude transitive dependencies from BND classpath

纵然是瞬间 提交于 2019-12-22 04:19:27
问题 Basically, my web service must be deployable as a single OSGi jar bundle. Therefore: The bundle must contain all compile and runtime maven dependencies. It must also contain all non-optional dependencies that depend on those dependencies (i.e., the transitive dependencies). I'm attempting to use the maven-bundle-plugin to accomplish this. I've used Embed-Dependency to get all my compile and runtime dependencies in the bundle, and I've used Embed-Transitive to embed all the transitive