-
Today I (re)discovered a feature in the Ibatis data mapper framework which was clearly documented, but for some reason was not being used in our project. The feature is called "inline parameter maps" and combined with a wrapper bean it can clean up a lot of clutter in the code and in the SqlMaps. Please feel …
Read More -
Being "in the flow". The nicest state of mind known to mankind. You act without thinking, and everyone of your actions is the perfect response to the situation. Riding a motorcycle on a beautiful road without a destination can easily get you into this state. With an empty mind, you see the next 2 corners, …
Read More -
When you use Spring and Ibatis and SQLTemplates, you could have code in your project which looks somewhat like this: Connection connection = DataSourceUtils.getConnection(getDataSource()); ...<do connection stuff here>... DataSourceUtils.releaseConnection(connection, getDataSource()); Sonar will report that you …
Read More -
At work, we have two applications which connect to the same database. For all kinds of business reasons, we need to make sure that only one of the applications accesses certain data at the same time. To do this, we use a row in a table as a semaphore. While working on the locking mechanism, we had a closer look at the …
Read More -
Suppose you have a Java Swing application which you can start by typing the following on the command line: java -jar myTerrificSwingApp.jar If you want to make that application start from the Finder in OSX, there are a lot of options which range from ugly to convoluted. If you need a quick fix, here's how to do it. …
Read More -
This evening I came accross the window.moveBy() JavaScript function and thought it would be cool to shake the browser window when a user fails to log in. It turns out that I was not the only one thinking this, but none of the examples worked for me. Some had no proper delays, others only worked from the page header, …
Read More -
It's frightening to realize how close to the truth Eric Burke is.
Read More -
Did you know that your installation of Leopard comes with a built-in performance monitor? It's called "Instruments" and you can attach it to any process currently running. In the screenshot you see here I attached it to an instance of Eclipse while running some unittests. Instruments has some nice templates …
Read More -
If you're a SQuirreL SQL fan like me, and you use a Mac, you probably also want to know how to add a driver to the OSX version of the application. Most people just point to an external jar file, but you can also add drivers to the application bundle. There's not much to it, but it took me some time to discover that I …
Read More -
I recently downloaded Eclipse 3.4.1 for Mac OSX, and tried starting it using the eclipse.app icon. It did not work, and I noticed a message in /var/log/system.log telling me that the JVM could not be loaded. After some Googling, I found out that Eclipse is not compatible with the new 64bit version of JDK 1.6 for the …
Read More