Questions tagged [osgi]

The OSGi (Open Service Gateway Initiative) framework is a module system and service platform for the Java programming language that implements a complete and dynamic component model.

The Open Service Gateway Initiative or commonly named OSGi is a specification for a Java component framework with enforced modularity. It provides a comprehensive model to build applications out of smaller, reusable parts. Though it works with any Java code, its advantages are best obtained by using its strong modularity. OSGi encapsulates each JAR in its own class loader and selectively exports packages. OSGi then links each module to the package/module versions they need thereby addressing JAR hell since multiple versions of the same package/module are allowed in OSGi. It also provides for private packages, i.e. packages not visible to any other module.

OSGi modules are normal JAR files with their metadata in the manifest, expressing the module's requirements and capabilities (e.g. import/export package, but extendable). OSGi modules are reified in runtime and have a life cycle. They can be installed, resolved, started, stopped, and uninstalled. Module code can run at start/stop time and an extensive event mechanism is the basis for numerous middleware that simplifies writing modules.

Popular Java factory/DI models collide with strong modularity (these model require implementation class names to be known outside their module). To alleviate this clash, the OSGi provides a modular solution to finding and sharing instances between modules, the so called (µ)services model. A consequence of the strong modularity is that OSGi can hot-swap modules without restarting the application. This is very useful during development but can also be used in server based applications.

All popular Java Application servers are either built on top of OSGi or fully support its module specification. The two popular open source OSGi frameworks are Felix and Equinox. Equinox is the foundation on which Eclipse is built. For the Java embedded world there are implementations like Knopflerfish, Concierge, Prosyst (commercial) as well as several private implementations.

The OSGi Alliance is a worldwide consortium of technology innovators that advances a proven and mature process to create open specifications that enable the modular assembly of software built with Java technology. The OSGi Service Platform facilitates the componentization of software modules and applications and assures interoperability of applications and services over a variety of networked devices.

6201 questions
2
votes
3 answers

Camel ActiveMq Blueprint

I am new to camel and blueprint. I am trying to make a simple programme to put data in a queue. Not sure whats going wrong in here. Camel Context file ==>
mikelee
  • 359
  • 1
  • 5
  • 18
2
votes
1 answer

Karaf webbundle not able to find persistence.xml

I have written a karaf web bundle(wab). I have kept persistence.xml in META-INF/persistence.xml as well as tried putting in WEB-INF/classes/META-INF/persistence.xml when i try to create an EntityManagerFactory i am getting the below…
2
votes
0 answers

OSGi Felix: secure REST resources through annotations

I'm developing an OSGi-based Web application that exposes several REST resources. To do so, I exploited two packages of Amdatu project, namely org.amdatu.web.rest.jaxrs and org.amdatu.web.rest.wink. The system works well, but now I have to solve…
2
votes
0 answers

Camel commands removed in Karaf console when uninstalling feature

I'm using Apache ServiceMix 6.1.0, with : Karaf 3.0.5 Camel 2.16.1 The issue I'm facing is that when I uninstall a personal feature from ServiceMix, Camel commands in Karaf console (e.g. route-list) are also removed. Steps : Drop feature.xml in…
2
votes
1 answer

Navigation in a simple Eclipse RAP web-application

I have a feeling that I'm about to ask something obvous/basic here, but I'm a novice when it comes the technologies and have not figured out the "correct" way of doing things so here it goes. Background I am currently developing a web-application as…
FableBlaze
  • 1,785
  • 3
  • 16
  • 21
2
votes
1 answer

OSGi dependencies visualization

March 2016. To analyze huge OSGi project with 100 bundles I would like to use visual tool (or some console or file output) to see all dependencies and interconnections between bundles (not classes) What I found so far How to analize/visualize OSGi,…
Paul Verest
  • 60,022
  • 51
  • 208
  • 332
2
votes
2 answers

karaf configuration property is garbled

I implement org.osgi.service.cm.ManagedService interface to get Karaf configuration. But when I give a Chinese value to the property, it is garbled.Initially, the files in the etc folder are encoded in latin1. I have tried to set utf-8 encoding, but…
2
votes
2 answers

Karaf exception is thrown while installing org.fusesource.leveldbjni

Hi i am trying to install the below dependency in karaf org.fusesource.leveldbjni leveldbjni-all 1.8 I am getting the below Exception Exception…
Charity
  • 213
  • 1
  • 5
  • 23
2
votes
2 answers

Feedback on Maven multi-module project setup with OSGi

I am getting in touch with OSGi and trying to setup a project using Apache Felix and Maven. I'd like to use a Multi-Module build and declarative services. The project is hosted on GitHub: osgi-maven-example (Note that the link points to a specific…
Thomas Eizinger
  • 1,404
  • 14
  • 25
2
votes
1 answer

How to get page's content info before replication(DELETE)?

In CQ5, I need to collect some info from page properties and child nodes properties befor replication(delete) occurs If i implement EventHandler: @Component(immediate = true) @Service @Property(name = EventConstants.EVENT_TOPIC, value =…
dzenisiy
  • 855
  • 10
  • 32
2
votes
2 answers

OSGi Specs and RFCs

I can only find and download OSGi Specs(e.g. core-spec, enterprise-spec) from its website. What about so-called OSGi RFCs? Are they publicly accessable, and how related to the Specs? Thanks!
sof
  • 9,113
  • 16
  • 57
  • 83
2
votes
0 answers

Using AspectJ to recognize method calls

I like to use AspectJ to recognize when a certain method is called within another OSGi bundle I don't have the source code for. Therefore, I build an aspect-bundle. For learning puposes the other bundle is implemented by a sample bundle which simply…
2
votes
0 answers

OSGi: Instance unnamed of type X is not bound

I'm currently facing a problem I'm just not able to solve. Hopefully you can help me. I'm creating a modular Vaadin application with Apache Felix and iPojo. The dependencies are resolved but when starting the application, Felix tells me the…
Kenneth K.
  • 53
  • 4
2
votes
1 answer

OSGI bundle status grace period

I am trying to install two bundles on Karaf. For one of the bundle i am getting error and when I see the bundle:diag i got below message. It is the same thing compaining in logs also. Similar kind of bundle already deploy and it has the same…
Kiran
  • 839
  • 3
  • 15
  • 45
2
votes
1 answer

Apache Camel Test Support with POJO and OSGI reference bean

I am creating a Junit Test using CamelTestSupport. The Camel Route has few references to POJO Beans and OSGI references.The OSGI reference is an Interface.I had used SimpleRegistry to capture the POJO beans using Java DSL. However, I do not know how…
enigma
  • 63
  • 6
1 2 3
99
100