Deployment parameter for REST resource

When you are creating resource in a REST application, it will only be automatically created if you have an empty parameter. The problem is, sometime we need a resource that is configurable, so it can be reused by other applications. We can solve this problem by defining init parameter in our web.xml like this: Or […]

Java Tips: Process Object Based On Its Type Without if-then-else Solution

I want to share my answer for this question on StackOverflow. Say you want to process several objects with different types. Each type must be processed differently but some concerns are: You don’t want if-then-else solution which is obviously not great for long-term Configuration is also bad for the same reason So how is the […]

Guava: Using ListenableFuture

Google Guava has many interesting classes which we can use on our application. The ones from collection package have been already used by many developers and this blog has tutorial on how to use the computing map. I want to move to the other package. This one is, specifically I want to introduce ListenableFuture. […]

Hello World… Using Spring Roo 1.1.0M1 under STS 2.3.3M1

The first day’s Google I/O keynote shows how much work has been done to integrate Spring Roo with GWT. Despite the fact that the demo is not smoothly done, it is kind of interesting combination. Before we have to do all the work to integrate Spring + Hibernate + GWT manually, now the work has […]