Blog Post Archive

Things I’ve written over the years. Explore blog posts by date below or by tags.

commons-logging in OSGI Environments

While working on a small toy project using Apache Felix and commons-httpclient, I kept running into the issue that there is no official OSGI bundle for Apache commons-logging out there. While most Apache commons projects either provide simple bundles or full blown OSGI implementations with Activators and Services, commons-logging is an interesting exception. If you scan the Commons OSGI status page, you will notice that there is no OSGI version for commons-logging available, and a separate section to explain why. I haven’t dug into why and how it conflicts with the OSGI classloading scheme, but I can see that being a problem. Be it as it may, there is no official OSGI bundle for commons logging.

OSGI Bootstrapping

I’ve been working with OSGI based technology for a while now and it’s a great piece of technology. However, so far I’ve only worked with OSGI technology that runs in existing instances of the framework. A running framework is easy to deal with, but how do you get to this point? I spent some time today playing with that, and it took me a while to put it all together. So naturally, I’ll have to record my findings here.

OSGI Classloading Reading List

I’ve been doing a lot of reading on how OSGI handles class loading. I’m starting to fully understand and leverage OSGI and I’m trying to keep my framework Object Mapper as compatible with OSGI as I can.

In OSGI classloading is very restricted, similar to what happens in enterprisy Java application servers, and completely unlike traditional Java applications where everything shares a single classloader. In OSGI each bundle has its own classloader and what is visible accross the bundle boundaries is subject to strict export rules. In order to use a class outside of a bundle you’ll have to explicitly declare its package as exported. There are many benefits to this strict architecture, clean architectures, reusable components and the ability to update bundles at runtime are probably the most important ones.

Horray for Jekyll

So I finally got around to play with Jekyll, a static site generator for websites. I was initially sceptical whether a static site generator would be up for running a blog, but after playing with it for a bit, I’m in love with this concept. The ability to write my posts in vim (MacVim that is) and version them with Git makes me very happy. As much as I like Wordpress, it’s getting more and more sluggish (on my old server at least) and every time I’m logging in to it, I spend half an hour installing updates and patches. And with every upgrade I’m worried about the database – even though, in Wordpress’ defense, no upgrade ever broke the database. Also, I’m particularly impressed with support for syntax highlighting, which is absolutely essential for technical posts. I’m still digging through the documentation and learning how to use Jekyll, but I’m getting there.

SSH (Remote) Tunnels

Just figured out how SSH remote tunnels work and wanted to write it down.

Nomenclature:

  • [Local] Client: your local computer. In fact, if I say local, I mean the client.
  • [Remote] Server: the server you connect to. If I say remote, I mean server.

Forward Tunnels

Your standard tunnel, allows you to take a local port and redirect it to a remote port on the server:

$ ssh -L REMOTEPORT:client:CLIENTPORT user@server

Now, that by opening a tunnel in this way:

Antlr Grammars for Fun and Profit

Recently at work I had to work on files in our legacy system. Those files, being part of a proprietary product, are unknown to any editor or pretty printer that you can find. And most of them are not formatted nicely, if at all. Being a lazy developer I really love eclipse’s code formatting features, because, hey, it takes away a lot of tedious and annoying formatting. Also, I think properly formatted files are easier to understand, maintain and fix. In fact, as I recently tweeted, I go as far as saying that I’m not particularly good in spotting problems, I just format everything which helps me to understand better.

Building a CMS with XML, XSLT, Ant, and ImageMagik

Not so long ago a freelance client approached me with some updates for their website. The site has been growing organically since 2000 and therefore was a big mess. Several attempts to port the site to a CMS driven system failed largely because those CMS systems are usually to complex for our needs (Typo3) or not flexible enough (Joomla, WordPress). So as I was faced with updates to all the updates including image updates which in turn needed thumbnails to be generated. The same day I stumbled randomly over the xsl:result-document function in XSLT 2.0 which allows you to transform a single XML file into several output files. That sparked an idea with me: why not use that to build a CMS system using XML technologies? I’ve toyed around with Cocoon a couple of years ago but that was not what I was looking for. So I looked for other technologies…

ilikeorangutans

Jakob Külzer’s personal blog