01.22.2010

Let’s face it, cygwin is neat but the console it launches is lame. I’m not referring to bash, but rather the normal — and thus lame — Windows command box. Things just don’t feel right… some keys don’t work as expected and forget about making the window wider. Fortunately, there is a better way!

Rather, I should say there are better ways: puttycyg and mintty.

puttycyg is a patched version of putty with support for cygwin. mintty is … well, yeah, it’s based on putty, too.

If you use cygwin, you owe it to yourself to try one or both of them immediately. And by that I mean stop reading and start downloading. Now.

01.11.2010

Shutting down ehcache properly

by Mike Christianson

If you’re using ehcache’s disk persistence feature, which allows the cache to survive across JVM restarts, be sure to shut down ehcache properly.

To do so when using ehcache within a webapp, simply add its ShutdownListener as a listener in web.xml.

<listener>
    <listener-class>net.sf.ehcache.constructs.web.ShutdownListener</listener-class>
</listener>

Alternatively, or when not using ehcache inside a webapp, instruct ehcache to register its own shutdown hook by setting a system property.

net.sf.ehcache.enableShutdownHook=true

If you forget one of the above, your persisted cache may not be up-to-date, or worse, not persisted at all.