georg
This user hasn't shared any biographical information
Homepage: http://vergiss-blackjack.de
Posts by georg
JMS basics
Jan 30th
I’m currently integrating JMS (Java Messaging Service) into a project. Being a true enterprise component it has a very complex nomenclature and consists itself of many modules to cover all kinds of topologies. To aid other newcomers here is an overview of what I’ve learned so far.
How to install CyanogenMod 7 on your Samsung Galaxy Ace
Nov 8th
I just successfully installed CyanogenMod 7 on my Samsung Galaxy Ace. Finding all the right instructions was a bit tricky so here’s my personal recollection on how to get you up and running with CM7.
Zendesk widget for Thunderbird
Sep 20th
I just released a small extension to integrate Zendesk with Thunderbird.
Run PostgreSQL in a ram disk
Feb 21st
At a a project I am heavily relying on PostgreSQL in the unit tests. This works fine but creating and dropping databases takes quite a while which goes against the purpose of unit tests. One simple solution to this is to run PostgreSQL in a RAM disk which will make IO-heavy operations a snap.
Accessing bundled resources in Java packages
Jan 8th
This is sort of a continuation of a previous post about how to integrate your own Java classes into the Maven build lifecycle. This entry described how to generate files for inclusion in the final project artifact (ie. .jar, .war etc.). It took me some time to figure out how to access these files using Java’s resource mechanism so this post will summarize my findings.
Calling Java classes from the Maven build lifecycle
Jan 4th
I love Maven for its flexibility, but this flexibility at times makes it hard to figure out how to achieve certain tasks. In my case I wanted to execute a certain Java class that is included in the project at some point during the build lifecycle. While I can see many uses in my case the class itself compiles a SQL dump out of several source files so it can be included in the final artifact.
Spring Security authentication with a Neo4j backend
Apr 26th
I am currently working on a Spring-based Neo4j (a graph database) application and needed to add user authentication. Since Spring Security allows integrating custom authentication providers it felt only natural to implement a provider based on Neo4j. A data structure to support users and groups is already provided in the Neo4j Wiki. I used it as the basis for my implementation with some wrapping so it could be integrated with Spring Security and provides administrative methods.
Nagios Plugin to check memory consumption
Apr 15th
For some reason the Nagios package in Debian / Ubuntu does not provide a plugin to check the memory consumption so I built a simple script to do that. It ignores swap space (since if your machine starts swapping you’re lost anyway) and caches (it’s nice to have memory available for caches but this isn’t really required). That way only the real memory consumption is checked and if that passes a certain threshold you can rest assured that you’re in for trouble.
Iterating over nested objects in a Spring form
Apr 13th
Spring 3 allows for wonderfully simply forms and automatic binding of form values back to the command object. However if your command object has further nested objects that you want to make editable from the form as well things get a little tricky. In that case you can’t just use a standard JSTL forEach loop as this will not allow you to build the path to the nested object correctly. The trick is to use the varStatus attribute to keep track of the index.
Unit Testing a Spring @Controller
Apr 11th
Thanks to Spring’s new MVC Annotations (@Controller, @RequestMapping, @RequestParam etc.) unit testing a Spring controller is now easier than ever before. Still, I had a hard time figuring out how to do this since most of your controller methods will not take a ServletRequest as input. Instead they use a form-backing / command object, a BindingResult and maybe a ModelMap. In a web environment Spring takes care of filling the command object and validation results however in a unit test you will have to do this yourself.
Following is the basic outline for writing such a test.