Les Hazlewood

Where Les is More

Maven 2 vs Ant+Ivy: Our selection process

This is an old post. I have long since moved on to Maven as described here The JSecurity team had a recent discussion on whether or not to use Maven 2 or Ant+Ivy moving forward. At the end of the day, I didn’t really care that much about which system we used, but I had three requirements: JSecurity releases must be pushed to the Maven 2 repository for easy access by both Maven.. Read More

Groovy Examples

Groovy is by far my favorite scripting language, since it leverages and integrates with all the Java stuff I use (applications, tools, server software, etc). It is just as expressive and powerful as Ruby, Python, etc., but feels a little simpler or cleaner, depending on the comparison. Here are two fantastic resources in the ‘Cookbook’ fashion, showing how to do many useful things with Groovy: The Groovy website Cookbook PLEAC’s Groovy Cookbook –.. Read More

Subversion Recovery Without a Backup

This post outlines how to re-create a subversion repository after a total failure or loss (disk overwritten, disk crash, accidentally deleted, etc) when you have no repository backups and only developers’ working copies. If you’ve lost your SVN server and have no backups of your repository, and you don’t want to do manual per-file copying from the old working copy to a new working copy, this is your only option – you have.. Read More

Cool Utada Hikaru story

So I was at work today, hammering away on the keyboard, when out of nowhere, as if coming through faint elevator speakers off in the distance, I heard Hiki’s first song on her latest Ultra Blue album, entitled “This is Love”. I thought to myself, “Man, am I hearing things? What the hell? I know this can’t be coming from the sound-deadening cubicles of a large Southern corporation…”. But I got up and.. Read More

Root Persistent Class for ORM Hierarchies (Hibernate, et. al.)

Ok, I’m about to divulge to the world one of my little programming gems – something I’ve used on every single project for almost the last 4 years now. It is very easily translated to any other OO language as well, especially C# for the .NET/Hibernate.NET folks. I haven’t been keeping it secret or anything, I guess I just never took the time to write it out for general public. So when someone.. Read More

Configuration-hell remedy with Singleton injection – DON'T do it

So, I just finished reading this blog post about Spring configuration advocating static getInstance() methods in some places in your code to reduce the amount of Spring xml config. Since I posted a reply on that blog, and the author would probably be inclined to moderate my entry and delete it because I directly oppose his position, I’ve reposted it here for the benefit of others to read. THAT POST ADVOCATES POOR ARCHITECTURE… Read More

Consistent Cache Configuration: Spring, Hibernate, EhCache, Shiro, et. al.

Have you ever wanted to use caching in your Spring/Hibernate application beyond just supporting Hibernate’s 2nd-level cache? If you know what a Hibernate 2nd-level cache is, you really know how huge its performance benefits are. Wouldn’t it be useful to utilize caching for other things in your application? Even if you don’t explicitly use a caching API in your app, you still might already be using caching without knowing it – other open.. Read More

Integrating Spring with the ThinWire Rich Internet Application framework

ThinWire is an amazing Rich Internet Application (RIA) framework that caters to Java developers. The concept is extremely similar to other frameworks out there such as the Google Web Toolkit (GWT), ZK, Echo2, wingS, Flex and some others. Lets just say that most people who use ThinWire and these other frameworks can increase productivity 10-fold for web-based applications – they’re that big of a deal. After quite a lengthy period of evaluation of.. Read More

IntelliJ IDEA on Mac OS X – Setting Java VM options

After installing Intellij IDEA Selena (EAP release) Mac OS X .dmg, I found that I couldn’t edit the vm memory heap options like I used to on Linux. I inspected the /Applications/Selena-7027.app/bin/idea.sh file and saw that it looks for a file in that same directory called idea.vmoptions. So, I created the file, added my vm options (primarily -Xms64m -Xmx512m), saved it and restarted Selena. Unfortunately my settings weren’t picked up. But I found.. Read More

Spring Application Bootstrap Data

When you install an application for the first time, many times you want ‘bootstrap’ data to exist before the application is used for the very first time. Here’s a simple but easy technique to get bootstrap data inserted into your application upon first startup. Prior to the following approach, I used to have ‘default.data’ and ‘sample.data’ tasks in my ant scripts that either ran SQL manually, or started up a separate Spring ApplicationContext.. Read More