Monthly Archives: January 2009

Managing ehcache through Spring

There does not appear to be any documentation in the Spring manual about setting up an ehcache cache in your Spring container. There is a Spring bean built in to do it. To set it up with the default configuration, all that is needed is a line like this:

<bean id=”mediaCache” class=”org.springframework.cache.ehcache.EhCacheFactoryBean”/>

It looks like you can also customize quite a bit of the config without providing an ehcache.xml file. That could be nice so you don’t have to go chasing around to find all of the settings.

Tapestry 5: radio buttons coming back with value "on"

I ran into a problem today where I was setting the value of a radio button in Tapestry 5 to a long field within a property. I was getting back the value “on” and Tapestry was crashing trying to coerce it into a long type. It turns out the value was null, and the default value for a radio button is “on”. So, if you encounter this, make sure your value fields are not null.

Computer lingo

I often find myself staring down some technical thing and step back for a moment to interpret the words on my screen the way a normal person would. I think I might start blogging these anecdotes. Here’s the one I’m looking at right now:

Upgrading Confluence EAR-WAR Edition

To a normal person, an ear is a thing that you hear with and a war is a thing that involves guns and bombs. The concept of fighting a war with ears or having a war involving ears is pretty funny. Confluence is also a word that means something. Perhaps the ear war is taking place near the confluence of two rivers.