Planet OSGi Tag

Two months ago the OSGi JAX-RS was released in Version 2.0. Today I'm proud to announce Version 2.1. In addition to minor improvements, a new feature was added based on the work of Dirk Lecluse. It's now possible to register @Provider annotated objects as OSGi services. The @Provider annotation is used to register custom de/serialization. Now you can implement a custom MessageBodyWriter, MessageBodyReader, ContextResolver or ExceptionMapper,...

Read More

Update: It turned out that there is already a solution to the problem described here. The bundle org.eclipse.equinox.supplement exports the packages needed by equinox.common. This bundle is available from https://download.eclipse.org/equinox/. If you want to run Eclipse databinding, simply inlude this bundle and org.eclipse.equinox.common and you're set. You can disregard the solution explained below. Thanks Pascal Rapicault for the pointer. Eclipse databinding is separated into a core...

Read More

Back in January 2012, I wrote about the release of the OSGi JAX-RS connector in version 1.0. The connector gives you the opportunity to publish resources by registering @Path annotated types as OSGi services. I'm glad to say that the connector is in production use in many projects. It is pretty stable and as a result there was not much need for maintenance. So, why...

Read More

With OSGi we are able to implement building blocks for modular applications. Dependency injection frameworks support us in writing flexible, testable and clean code. The "Blueprint Container Specification" defines a dependency injection framework to build applications that run in an OSGi framework. The specification was added in version 4.2 to the OSGi compendium Specification[1]. This specification is derived from the Spring Dynamic Modules project[2] which...

Read More

This post shows how to develop RAP applications with Virgo. The first part guides you through the setup for a Virgo Server instance and how to extend it to become a RAP runtime. The second part is a short walkthrough of how to create a Hello World RAP application using the new RAP OSGi integration. Extend Virgo Kernel 3.0 to support the RAP Widget Toolkit 1.5 Setup...

Read More

When adopting the Whiteboard Pattern for one of our Eclipse RAP based web applications, we stumbled upon a problem concerning the session scope of events. Here's how we solved it. The Whiteboard Pattern in OSGi development is an alternative to the event listener or Observer pattern commonly used in Java programming. In an OSGi environment, the Whiteboard Pattern is widely considered to be the better choice...

Read More

RAP 1.5 includes a new API to define and start RAP applications programmatically (up to RAP 1.4, this was only possible using Eclipse extensions or web.xml properties). With this new API, RAP can also be used for leightweight applications based on OSGi, but without the entire Eclipse stack, even with other OSGi containers like Apache Felix. Also traditional web applications, that use RWT as a...

Read More

In a recent blog post Peter Kriens commented that the OSGi service model is as important as object-orientation. I feel the same - I don't want to write software without this concept anymore. But for me, the service model only makes sense when it's used together with the modularity OSGi provides. I think the modularisation layer is the greatest advantage of the OSGi platform and...

Read More

Update 2: The new interfaces have been renamed again in RAP 1.5M7. Please refer to this post for the details and check out the updated code example. Update: APIs have changed a bit meanwhile, so I updated the code below accordingly. Entry points are now registered by path, and JEE_COMPLATIBILTIY has become the default mode, which makes the main loop obsolete in this kind of applications. RAP...

Read More

In this blog post I describe how to set up a cluster node with an embedded Jetty Server inside Equinox. Basically I followed the instructions available at the Jetty Wiki page Session Clustering Using a Database [1]. There are two Jetty configuration files involved: /etc/jetty.xml defining a JDBCSessionIdManager /WEB-INF/jetty-web.xml defining a JDBCSessionManager The main jetty.xml resides in the folder etc of the jetty.home.bundle which itself is a fragment of org.eclipse.jetty.osgi.boot....

Read More