I create web applications by first creating a set of OSGi bundles that form the building blocks of the application, and then use karaf features to pull the building blocks together to create complete applications that run inside apache karaf.
The JerseyServlet simplifies the approach outlined in Use Jersey to provide REST APIs from karaf applications.
Continue reading Simplified REST APIs from karaf using Jersey
OSGi is a Java plugin framework and module system that were initially created for supporting embdedded applications in the automotive industry. OSGi also forms the foundations for the Eclipse IDE plugin model. The plugin model of OSGi consists of components waiting for services and starting and exposing services when all of the dependencies are satsified. A “service” in OSGi terminology, is a Java interface.
I first encountered OSGi in 2006. The company I worked from used OSGi as the basis for an ETL processing system implementing various processing elements as OSGi plugins plugging into the processing framework. Since writing OSGi activators (which was the state of the art for OSGi plugins back in the day) is kind of boring, we created a Dependency Injection system on top of OSGi.
After creating the post Pluggable databases for apache karaf applications I posted a link to the blog post in the karaf user mailing list, and the immediate response was, “why didn’t I just pax-jdbc-config instead?“.
The answer to that is that I didn’t know about pax-jdbc-config. I started using pax-jdbc in the summer of 2016, and started using apache karaf in the autumn of 2016 and pax-jdbc-config didn’t exist then (or at least: not as complete and usable as it became in 2017), and any announcement that has gone past since then, has not registered.
Edit: I no longer use this approach. I use pax-jdbc-config instead. See the article Rewriting applications to use pax-jdbc-config and liquibase for details
Continue reading Pluggable databases for apache karaf applications
Edit: creating a REST API using jersey has been made simpler, see Simplified REST APIs from karaf using Jersey for details.
Continue reading Use Jersey to provide REST APIs from karaf applications
Edit: delivering react.js has been made simpler, see Simplified delivery of react.js from apache karaf for details.
Continue reading Deliver react.js from apache karaf