osgi

Mini-OSGi that can run in a sandbox (like AppEngine or WebStart)?

故事扮演 提交于 2019-12-02 18:24:54
I really like the concept of modular bundles as implemented by OSGi. I also like "managed deployment" services like Google AppEngine (for web application) or Java WebStart (for client software). These two ideas seem to complement each-other rather well conceptually. However, the OSGi standard includes a couple of features that make it impossible for implementations like Felix or Equinox to run on top of sandboxed virtual machines, such as AppEngine or Webstart. In these environments, it is not possible to get direct access to a file system, for example, which precludes the OSGi bundle cache

How to support virtual hosts with OSGI HttpService

吃可爱长大的小学妹 提交于 2019-12-02 18:19:13
问题 All examples of using an osgi HttpService show how to register servlets, resources, etc -- but all on the same service instance, and in the same namespace. How can I run multiple instances of the HttpService in osgi (preferably embedded), each with its own namespace, based on HTTP requests received for a specific IP address or hostname? 回答1: There is a project on Google Code that purports to allow starting multiple HTTP Service . I've not used it but it might solve at least part of your query

EventAdmin is null in maven-osgi project

独自空忆成欢 提交于 2019-12-02 17:53:25
问题 I made an maven-osgi project where an activator should send an osgi event but for some reason EventAdmin is always null. Here is my java class package com.example.eventhandler; import java.util.Dictionary; import java.util.Hashtable; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.osgi.service.event.Event; import org.osgi.service.event.EventAdmin; public class App implements BundleActivator { public

What is the underlying theme in OSGi?

谁说我不能喝 提交于 2019-12-02 17:48:17
OSGi is a dynamic modular system for Java. Ok, but what is the base line theme, why was OSGi developed? What are the benifits of using OSGi? What is the main story of developing OSGi? Why does it exist? If you look closer, the concept of classpath in Java really sucks. You distribute your classes in JAR files, but during runtime Java will (almost) blindly throw all the classes from all the JAR files into one big bag where classes with the same name overshadow each other and then interact in unexpected ways. OSGi brings a proper runtime modularity to Java platform and on top of that a powerful

OSGi - How mature is this technology?

一世执手 提交于 2019-12-02 17:41:43
I have a requirement where I need to share some web resources ( jsp , html , js , images , css etc.) across different Spring based Struts 2 applications. And seems like OSGi can be used to achieve this? Can some one give some pointers on how to achieve this with OSGi ? And secondly I want to know is OSGi mature enough to be used in production applications? Thanks in advance! EDIT: I went through this post and seems like people are able to share a web bundle across web applications. The only difference is that they did it with Spring MVC. I want to know whether this can be achieved with Struts2

“Unresolved requirement: Import-Package” for a module not in my build.gradle

我只是一个虾纸丫 提交于 2019-12-02 17:02:08
问题 I want to use Elasticsearch's Client Java class within a Liferay 7 SP4 FP30 module, so I wrote this build.gradle : dependencies { compileOnly group: "com.liferay", name: "com.liferay.portal.search.elasticsearch", version: "2.1.14" compileOnly group: "com.liferay", name: "org.elasticsearch", version: "2.2.0.LIFERAY-PATCHED-1" compileOnly group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0" compileOnly group: "com.liferay", name: "com.liferay.osgi.util", version: "3.0.0"

Why are uses constraints violated when both chains end in the same bundle?

馋奶兔 提交于 2019-12-02 16:53:46
I have four bundles, each containing only a manifest. The bundles are app which imports com.example.foo.fragment and com.example.bar foo which exports com.example.foo;uses:=com.example.foo.cfg foo.fragment which is a fragment attached to foo that exports com.example.foo.fragment and com.example.foo.fragment.cfg;uses:=com.example.foo.fragment bar which exports com.example.bar and imports com.example.foo Bundle-level dependency graph : app -> bar | | | v | foo | | v v foo.fragment When I install these bundles all at once in JBoss AS 7.2, they work just fine. But if I install the app bundle after

How to deploy OSGi apps and dependencies?

半城伤御伤魂 提交于 2019-12-02 16:38:34
OSGi seems to have an excellent benefit of having small deployable artifacts by not wrapping dozens of JAR dependencies into a lib directory. However, I can't find anything that tells me an easy, reliable way to deploy dependencies to a container. For instance, I have an application that uses CXF and several Spring subprojects. If I need to deploy this application to a new Glassfish server, what would be the best way to do so, ensuring that all dependencies get installed? I'm using Maven, and it would seem that there could be some way to have a hook that looks at the META-INF/maven directory

Dependency Injection in OSGI environments

不羁岁月 提交于 2019-12-02 16:12:47
First some background: I'm working on some webapp prototype code based on Apache Sling which is OSGI based and runs on Apache Felix. I'm still relatively new to OSGI even though I think I've grasped most concepts by now. However, what puzzles me is that I haven't been able to find a "full" dependency injection (DI) framework. I've successfully employed rudimentary DI using Declarative Services (DS). But my understanding is that DS are used to reference -- how do I put this? -- OSGI registered services and components together. And for that it works fine, but I personally use DI frameworks like

Apache Karaf vs. Servicemix

丶灬走出姿态 提交于 2019-12-02 15:53:15
Is anyone using Karaf instead of Servicemix? If so, how did you come to this decision? I'm aware that Servicemix adds a layer of functionality around Karaf, just curious if Karaf is being used on its own and why... earcam We're using Karaf for a number of our applications. We were already using Camel (JMS and Esper) for integration between several different platforms (a JBoss 4.2 instance, a Tomcat and several Felix instances) and as this was working well there was little justification in migrating this too (which would have been cause to consider ServiceMix). The only reason we have some