Handling errors in a REST way is seemingly simple enough: upon requesting a resource, when an error occurs, a proper status code and a body that contains a parseable message and using the content-type of the request should be returned. The default error pages in Tomcat are ugly. Not only they expose too much of… Continue reading RESTful error handling with Tomcat and SpringMVC 3.x
Category: java
Using Spring 3.0 MVC for RESTful web services (rebuttal)
Update Mar.04 Thanks to @ewolff some of the points described below are now official feature requests. One (SPR-6928) is actually scheduled in Spring 3.1 (cool!). I’ve updated the post and added all open tickets. Please vote! This post is somewhat a response to InfoQ’s Comparison of Spring MVC and JAX-RS. Recently I have completed a… Continue reading Using Spring 3.0 MVC for RESTful web services (rebuttal)
Unit testing with Commons HttpClient library
I want to write testable code and occasionally I bump into frameworks that make it challenging to unit test. Ideally I want to inject a service stub into my code then control the stub’s behavior based on my testing needs. Commons Http Client from Jakarta facilitates integration with HTTP services but how to easily unit… Continue reading Unit testing with Commons HttpClient library
New Spincloud feature: heat map overlay
It took a while since the previous feature update to Spincloud. I have done a number of upgrades to the underlying tech and some intensive code refactoring but nothing visible. The time has come for another eye candy: heat maps. It is a map overlay that shows a color-translated temperature layer based on interpolated values… Continue reading New Spincloud feature: heat map overlay
Reviewing Google AppEngine for Java (Part 2)
In the first part I’ve left-off with some good news: successful deployment in the local GAE container. In this second part I’ll talk about the following: – Loading data and browsing – Table indexing – Limitations of datastore queries – More datastore limitations and JPA issues – Deployment – Performance – Production monitoring – Usage… Continue reading Reviewing Google AppEngine for Java (Part 2)
Upgrading to Spring 3.0.0.M3 and Spring Security 3.0.0.M1
A short two months back I posted an article describing how to upgrade to Spring 3.0 M2. Spring folks are releasing at breakneck speed and so I got busy again upgrading spincloud.com to Spring 3.0 M3 released at the beginning of May. Just yesterday (June 3rd) the team released Spring Security 3.0 M1 and I… Continue reading Upgrading to Spring 3.0.0.M3 and Spring Security 3.0.0.M1
Reviewing Google AppEngine for Java (Part 1)
When Google announced that Java is the second language that the Appengine will support I almost didn’t believe it given the surge of the new languages and the perception that Java entered legacy but the JVM is a powerful tried-and-true environment and Google saw the potential of using it for what it is bound to… Continue reading Reviewing Google AppEngine for Java (Part 1)
Selecting location data from a spatial database
I have been thinking to write about this subject a while back when project Spincloud was still under development. I was even thinking about making this the first post on my blog. The idea is simple: you have location-based data (POIs for instance) stored in some database (preferably a spatial DB) and now you want… Continue reading Selecting location data from a spatial database
Evaluating EclipseLink 1.1
As I’m using the ubiquitous Hibernate 3.3 as the JPA 1.0 provider for Spincloud, I decided to try out another one. I had tried OpenJPA (spawned from Kodo JDO) when they only supported build-time bytecode enhancement and it was a pain to make it work. It worked all right but boy what a pain. There’s… Continue reading Evaluating EclipseLink 1.1
Choosing a Java hosting provider
TL;DR: Go for a VPS. I now use Digitalocean, they’re awesome. Selecting a web hosting provider is a tough job for any web developer that wants to put a Java/JEE web application online. The choice is much simpler when it comes to publishing a PHP web site and there are a load of cheap (and… Continue reading Choosing a Java hosting provider