Apache Felix Configuration Admin and collections

A long time ago I wrote an post about Configuration Admin and Arrays. Recently I attempted to use this feature with openHAB and I found that it doesn’t work with its configuration framework.

February 16, 2022 · 1 min · splatch

Apache Felix Configuration Admin with array values

Apache Felix Configuration Admin (CM) is widely used component which is responsible for provisioning of one of most common OSGi services. Main responsibility of it is to bring configurations stored in property files to services. While digging into Felix CM code I have found that it is able to create scalar values of certain type ie. Long, but also more complex structures such Array or Vector. The biggest issue was that I couldn’t find any way to force it to create array from string representation. Thanks to google ( FELIX-4431 found on 4th page of results) and debugger goodnes I finally managed to do it. Here is recipe how to proceed. ...

February 17, 2015 · 2 min · splatch

Advanced Apache Camel logging and best practices

Apache Camel supports a mapped diagnostic context which can be used to improve log entries, but also there is a log component which makes it easier to create log entries. Together they can be used to create foundations of activity monitoring without need to deploy another tool or database.

February 28, 2012 · 9 min · splatch

Running aspects under OSGi 4.2 with Karaf

One of bigest benefits of Java is byte code manipulation. You can change everything you want in your application without touching source code. That’s usefull for many cases, starting from legacy code, where we can’t simply modify and recompile library up to modern applications where aspects can be used to handle runtime exceptions. The most popular project is AspectJ which is part of Eclipse ecosystem, in this post I going to show you how to use AspectJ with Karaf.

November 24, 2011 · 6 min · splatch