Having used the Spring MVC 2.5 webframework for a while now, I felt the urge to blog about some of the experiences I had with it. Especially about the part concerning forms, validation, binding and property editors. That’s the part that was usually provided to you by the SimpleFormController (in the ‘old’ Spring MVC). But […]
Customize namespace prefix when marshalling with Jaxb
I was looking a long time on how to set the prefix for a namespace when marshalling an object to xml using JAXB. If you don’t do anything JAXB will write random namespace prefixes (like ns2, ns3).? Note: This is a repost of a blog item that was originally posted in the Func knowledge base […]
EasyMock: capturing arguments passed to mock objects
EasyMock2 is a library that provides an easy way to create on-the-fly mock objects based on interfaces. It can be used in combination with JUnit to create simple and powerful unit tests. Here’s an overview of the basic EasyMock flow, followed by a brief example that demonstrates a new feature in EasyMock 2.4: capturing arguments passed to MockObjects.
Disabling URL rewriting for the Googlebot
Http is a stateless protocol. To work around the problems caused by this, web applications have the concept of a session. When a user requests a webpage for the first time the user is assigned a unique 32 character string. This string can be send along in subsequent requests to indicate that these requests are […]
Test driven development for GWT UI code with asynchronous RPC
In my previous blog post I we saw a test-driven approach to GWT UI code. This was based on moving logic to a Supervising Controller. In this follow-up post we’ll turn our attention to interacting with RPC, and see how this can be tested using EasyMock. This involves some tricks and non-trivial boilerplate code, but […]
Test driven development for GWT UI code
Is a test driven development (TDD) approach possible when creating a GUI using GWT? This post is about how to apply MVC (Model-View-Controller) to organize GWT UI code, with these objectives: a clear separation of the controller logic from presentation and model full testability of the controller logic independent of the (browser or hosted mode) […]
Too many open files
Today I was asked to review a piece of code that a coworker of mine suspected was causing “Too many open files“ exceptions in a production environment The code looked innocuous enough. He was using ProcessBuilder to create and run an external application. Regardless I booted into Linux and ran some tests. Now on Linux […]
Spring 2.5 and Maven problems
It looks like the spring 2.5 jars that where uploaded to the official maven repository are broken. The full spring jar is 321 kb large and only contains the spring aop classes. Anyway I added springs own repository to my pom and then i got the correct jar and sources <repository> <id>spring</id> <name>Spring Portfolio Repository</name> […]
Optimizing startup time for GWT hosted mode
When developing GWT (Google Web Toolkit) applications, the GWT hosted mode is an invaluable tool, as it allows for short development cycles. Whenever you change something in the GWT client code and hit the “Refresh” button it will compile the change, reload the application and show the result of my change almost immediately. In theory, […]
Extensibility jBPM style
Currently I am involved in a project that is moving away from a proprietary workflow solution to a JBPM based workflow solution. One of the first things I attempted to do was try and make jBPM integrate with the identity management solution used in the project. I knew that jBPM comes packaged with some sort […]