An intro to Spring mocking classes here.
Via java.no.
Seems Raible thougt The Spring Experience was a blast. I was just stuck in cold Norway. 😉
Craig Walls has an article about using AspectJ integrated with Spring for injecting DAOs, thus letting the domain objects persist themselves. It would also be an elegant way to enable domain objects to do checks against the database that are not possible just through traversing the objectgraph.
An interesting idea, and I’ve been missing something like it. The biggest grief I had when letting domain objects access my DAOs and not using this, was that classes had to remember to inject the correct DAO before utilising methods. This is maybe one of the most relevant uses of Aspects I’ve seen yet, and might be the reason I pick it up.