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 migration from a JAX-RS implementation of a web service to Spring 3.0 MVC annotation-based @Controllers. The aforementioned post on InfoQ was published … read on »
All posts filed in “java”
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 test code that depends on the HttpClient library? Turns out it's not that hard. I'll cover both 1.3 and the newer 1.4 … read on »
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 of the current weather conditions. It gives a quick indication of the average temperature across all land masses where data … read on »
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 and quotas - Other limitations - Final thoughts Loading data and browsing After finishing-off the first successful deployment, next on the agenda was testing out the persistence tier but for this I … read on »
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 decided to roll this in Spincloud as well. Upgrading Spring Security from 2.0.4 to 3.0.0 M1 For Spring Security 3.0.0 M1 I'm … read on »
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 become: a runtime environment for the new and exciting languages (see JRuby and Grails). The JVM is the new gateway drug … read on »
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 to perform a select statement that will indicate the area that should include the points we want. In case of Spincloud's … read on »
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 now an agent to provide on-the-fly enhancement but I'll take transparent enhancement anytime. I've heard about EclipseLink before. The … read on »
Choosing a Java hosting provider
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 sometimes quite reliable) PHP hosting providers to choose from with LAMP being the de facto standard in the web hosting world. But when it comes to Java hosting providers the picture … read on »
Upgrading to Spring 3.0
In the spirit of beta I'm upgrading spincloud.com to Spring 3.0. I'm using version 2.5.6 currently but it's missing REST support and I had to use Carbonfive's REST library which worked like a charm. Now it's time to get back under Spring's fold and use their built-in REST support. Spring 3 opens the door to a lot of new features so I'm eager to try it. I'm using Maven2 to get the jars and Ant to … read on »

