ethlo

Simplicity is the ultimate sophistication

eclipselink-maven-plugin 2.6.2 released

10 Jan 2016
I’m happy to announce version 2.6.2 of eclipselink-maven-plugin! New features Support for JPA 2.1 features and @Convert converter - Thanks Lukáš Vasek. Simple test project now available. Useful as example, testing and getting started use. Internal changes Update to latest annotation configured Maven plugin model getting rid of deprecated Maven features. Let me know how it works!
Read more...

Migrating git repo to new server

08 Jan 2016
Simple script to copy all branches and code from one repo to another. Use at your own risk! =) migrate.sh #!/bin/sh set -e if [[ $# != 2 ]] ; then echo "Usage: $0 <source-repo> <destination-repo>" exit 1 fi tmpdir=`mktemp -d 2>/dev/null || mktemp -d -t 'tmpdir'` git clone --mirror $1 $tmpdir cd $tmpdir git remote rm origin git remote add stash $2 git push --all stash git push --tags stash rm -rf $tmpdir
Read more...

Waiting for transaction propagation

05 Jan 2016
In the land of traditional ACID DBs, I often encounter code that is trying to collaborate with som external system using a queue or notification system. The problem is that is is ending up sending the notification to the external system before the data has been committed to the central database. Then when the external system tries to query for data based on the notification, the data is not there yet (a different or outside...
Read more...

Generic API documenter for web-services

29 May 2014
For some time I have meant to fully document all the different APIs I’m involved in. It gives a more professional feel, it helps integrators and front-end developers and it actually makes it easier to spot inconsistencies in naming or configuration. Most of our software is written in 100% Java 7 or 8. I was making an effort to find tools that could help me do this automatically, because nothing is worse than outdated and...
Read more...

Using PHP and existing htpasswd-file for authentication

01 Feb 2013
Our clients was a bit unhappy with the inability to log out from basic auth protected services. As I did not want to have everyone update their passwords (and having them kept in a file is actually flexible enough for such a small service) I wrote a small helper class to match username/password in the existing .htpasswd file. HtpasswdAuth.php <? class HtpasswdAuth { private $passwdFile = NULL; function __construct($passwdFile) { $this->passwdFile = $passwdFile; } public...
Read more...

Spring DefaultKeyGenerator gotcha

30 Jan 2013
To speed things up I had applied the excellent @Cacheable annotation to a service method in our application (don’t miss the excellent performance analysis here, btw). However I had not paid too much attention to the parameters going into the cache key. I would have expected something like concatinated toString() or something similar, however the default is to use the hashCode() of each parameter and create another (32-bit) hash code. Obviously this can easily generate...
Read more...

Back to the world

29 Jan 2013
I thought that since it feels pretty late to enter the blogosphere at my age, I will write up a small explaination if there is anyone interested. As I have always had a passion for things that are fast (being code or vehicles), I started a site where I was writing tweak guides for games, especially FPS games. Back in ‘99, s I realized that many of these games ([Quake](http://en.wikipedia.org/wiki/Quake_(game), Half-Life had simple text based...
Read more...