Limiting WordPress RSS2 feed output

August 11th, 2009 | 0 Comments

In a position at a previous job, I needed to vary the number of posts that the WordPress RSS feed returned. This can be configured in your WordPress settings, but it doesn’t seem to be configurable per request. For example, I wanted to call a URL such as

This would hopefully return me the latest 4 blog posts. However, WordPress doesn’t allow you to do this. It only reads its own option for the number of posts per feed.
Read the rest of this entry »

Hibernate and HSQLDB — just don’t

August 10th, 2009 | 4 Comments

It’s been a while since I’ve used Java and catching up with some great persistence libraries such as hibernate has been fun. In my recent project I was looking for a standalone java database technology and by default, I referred to one I’d used before: hsqldb.

Read the rest of this entry »

Hibernate: SHUT UP

August 10th, 2009 | 0 Comments

Recently I’ve started using Hibernate in a little side project I’ve been working on. It makes simplified database access very straight forward and quick. Infact, I didn’t really want a database, just some persistent storage that required the very least amount of programming. Hibernate with H2SQL database fitted the bill perfectly.

I used Hibernate as bundled with Netbeans 6.7 IDE, though I rolled my own Hibernate Configuration object instead of using the typical hibernate.xml. I tried all sorts of things to turn off the hibernate logging after reading many posts about the logging settings.

In the end, the problem was simply that Hibernate uses Log4j for logging by default if available, falling back to the default java logger if it is not included. Adding the Log4j library to the Netbeans project caused Hibernate to log with Log4j, allowing the custom Hibernate logging settings to kick in. Huzzah.