Home » Author Archives: Dan Haywood

Author Archives: Dan Haywood

Using Google Guava’s Ordering API

java-logo

We’ve been playing a bit more with Google’s Guava library – what a great library! The most recent thing we used it for was to sort out the comparators for our domain objects. Here’s how. Using Apache Isis‘ JDO Objectstore, it’s good practice to make your classes implement java.lang.Comparable, and use SortedSet for the collections. You can see this in ...

Read More »

Giving up on Eclipse Juno

eclipse-logo

In my last blog I posted about my Eclipse 4.2 Juno setup; as much as a reference for me in case I needed to do a reinstall as anything else. What I didn’t talk about then was the issues I’ve been having generally with Juno. I had thought it was my own installation being screwy, but things haven’t improved much ...

Read More »

Registering entity types with OpenJPA programmatically

apache-openjpa-logo

I’ve just started work on an OpenJPA objectstore for Isis. In the normal scheme of things, one would register the entity types within the persistence.xml file. However, Isis is a framework that builds its own metamodel, and can figure out for itself which classes constitute entities. I therefore didn’t want to have to force the developer to repeat themselves, so ...

Read More »

Simulating CDI’s Session and Request Scope in a J2SE app

java-interview-questions-answers

We’re currently considering refactoring the Naked Objects framework to use JSR-330 (dependency injection) and EE-oriented big brother, JSR-299 (CDI). Using vanilla JSR-330 is a no-brainer, but there are also some nice features in JSR-299 that we’d like to exploit (such as events and decorators). The snag? The Naked Objects must also run transparently in J2SE environments. Now JSR-299 (at least, ...

Read More »

DB unit testing with dbUnit, JSON, HSQLDB and JUnit Rules

dbunit-logo

In this week’s run of my TDD course, I thought it would be interesting to write a little fixture to make it easier to use dbUnit. My original thought was just to teach dbUnit about JSON, but it turns out that Lieven Doclo has done that already. So I decided to go a step further and also combine dbUnit with ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close