Jolokia in Karaf 3.0.x – Fixing the 403 access error

The latest version of Jolokia – 1.2.1 running in the latest version of Karaf – 3.0.1 fails with an HTTP 403 error. The issue applies only when the jolokia-osgi bundle which depends on the OSGi HTTP service is deployed. The master branch in Jolokia which is not released yet contains a fix for this issue and introduces 2 new configuration properties specific to this.

Exporting Camel Endpoints as OSGi Services

It is often useful to proxy calls to services exported by a Blueprint context through a service bus. The bus could be used to log incoming calls, adapt/filter the call arguments and the result, transparently forward requests to a remote OSGi container, broadcast to several remote containers or forward to the more powerful Fuse Fabric endpoints. Exporting a regular interface to a Camel endpoint is key to this functionality.

AngularJS using the HTTP Whiteboard Service

The HTTP Whiteboard service extends the OSGi HTTP service by automatically registering servlets, filters and resource mappings with the embedded servlet container. An AngularJS application consists of static resources that can easily be deployed in any HTTP server. The deployment of AngularJS in Blueprint leverages the HTTP Whiteboard service.

Spring Data MongoDB in OSGi Blueprint

Spring Data is yet another extremely useful Spring subproject that is so tightly coupled with the Spring-specific container features, that it has become very hard to deploy it in Blueprint.

The alternative to an adaptation to Blueprint is (once again) mixing Spring DM and Blueprint bundles and importing Spring DM services into Blueprint contexts.

Developing a REST Service in Apache Karaf

This article focuses on the implementation of a REST service that can be deployed on Apache Karaf using the excellent HTTP Whiteboard service. In the first part, we will concentrate on building a REST service with Apache CXF and exporting it with the HTTP Whiteboard. In the second part, we will elaborate on securing the service using Spring Security.

Dozer POJO Mapper in OSGi

Dozer is a popular bean-to-bean mapping library. This functionality is typically needed when switching between domain models, e.g. to isolate the internal representation of a domain model from the model published to clients through a REST API.

Dozer has a pluggable class loading configuration which allows to set a custom class loader for classes and resources. However Dozer was not designed with OSGi in mind. Custom class loaders are set on a Dozer singleton. This combined with the lazy loading of mapping definition files can generate unexpected results.

Highly-Available LDAP Server in Apache Karaf

OpenDJ is a powerful LDAP server based on the popular OpenDS server. OpenDJ supports multi-master replication, failure auto-detection and recovery. The replication setup is extensively documented and fairly simple to setup. Apache Karaf is a customizable OSGi container with excellent support for application deployment. For OSGi application requiring an LDAP server, it would be ideal to be able to deploy OpenDJ as just another feature of the main application in Karaf.