The Knapsack problem

I found the Knapsack problem tricky and interesting at the same time. I am sure if you are visiting this page, you already know the problem statement but just for the sake of completion : Problem : Given a Knapsack of a maximum capacity of W and N items each with its

Camel CXF Service with Multiple Query Parameters

While the awesome Apache Camel team is busy fixing the handling of the multiple parameters in the query, here's a workaround. Hopefully, this post will become obsolete with the next versions of Camel. (Currently, I use 2.7.5) Problem Query parameters more than 1 is passed as a null

SLF4J binding for ADFLogger - the missing piece

For reasons best left untold, in my day job, I was expected to provide an SLF4J Adapter for ADF Logger Oracle ADF. Not surprisingly, slf4j does not have an adapter for ADFLogger but since ADFLogger was just a gentle wrapper over Java Util Logging, it took a little over an

Building Camel-CXF REST Service in OSGi for Karaf - Multicasting and Aggregation

Please check out my other post on building plain CXF services (without Camel) in OSGi on Karaf. This is a basic tutorial on how to create a CXF REST service multicast (and parallelize) the incoming request using Camel source data from two different services aggregate the response and finally return

Building CXF REST Service in OSGi for Karaf

I'll leave it to the experts to tell how awesome OSGi is. Among the many benefits, I could tell you why we picked up OSGi for a pet project - Modularity, avoiding JAR hell and dynamic updates (hey, why not?) We chose Apache Felix (an OSGi framework specification implementation) and

Quicksorting - 3-way and Dual Pivot

It's no news that Quicksort is considered one of the most important algorithms of the century and that it is the defacto system sort for many languages, including the Arrays.sort in Java. So, what's new about quicksort? Well, nothing except that I figured just now (after 2 damn years