RSS Feed Subscribe to RSS Feed


Swing, Webstart, Maven – a difficult combination

I have spent the last few weeks struggling with a Swing app that I wanted to deploy via Webstart and build using Maven, via the the Webstart Maven Plugin. It has been a hugely painful process. I found the plugin documentation difficult to follow, struggled to understand the subtle config differences in jnlp, took longer than I expected to get jar signing working, had problems with webstart caching and suffered through a plethora of vague error messages. I found this posting where the author vowed to never use Webstart again, and I can empathize. Postings of people asking for help with Webstart problems certainly aren’t difficult to find. Using maven to build the jnlp provides some conveniences, but introduces new problems too. Overall, I’d prefer to avoid using a Swing/Webstart/Maven solution again.
Read more

Tags: , , , , ,

JavaOne: Comparing Java Web Frameworks

The first talk I attended at this year’s JavaOne was “Choosing Your Java Web Framework” by Richard Pack from

Overall, I found this a really interesting talk. It was lacking in any sales pitch, nor did it have the unquestioning devotion to one particular framework that I felt some of the Java FX talks had. Instead it seemed like an unbiased look at web frameworks in general and a handful of frameworks in more detail, based on Richard’s extensive and hands on experience and SalesForce and Hyperic.
Read more

Tags: , , , , , , ,

Spring MVC Hello World

There is a good Getting Started with Spring MVC blog post over on the Spring team blog.

I have created several Spring MVC projects for both work and play, and am attaching my own simple version of the HelloWorld example here, based on the Spring blog example.
Find my maven ready source here.
Like my previous JSP/Servlet example, I find these templates useful for getting prototypes up and running.

Tags: , , , , , ,

Spring Enterprise Recipes

I recently found out that this book has just been published:
Spring Enterprise Recipes: A Problem-Solution Approach
It is written by Josh Long and Gary Mak. I have heard Josh speak at several conferences, followed his articles on TheServerSide (as well as on his blog) and recently got to hang out with him at the SoCal Code Camp. He is very knowledgeable about Spring and enterprise integration and since Gary is already an author of one of the leading Spring books (Spring recipes), this should be a great book. I have just ordered my copy and will try to post a review when I am done with it.

Tags: ,

Data binding in Spring MVC

Two of the most important tasks carried out by Spring MVC when you submit a form are Data binding and validation.
The following article discusses data binding, including the use of custom PropertyEditors, and some of the options available for registering such editors. Most of the information discussed applies to Spring in general, but its application in Spring MVC is my primary interest.

In a future article I would like to discuss validation including the use of custom error messages.

Note that these notes relate to version 2.5.6 of Spring, the latest production code at time of writing, and depend heavily on the corresponding Spring reference docs.

Read more

Tags: ,

Apple’s MobileMe finally gets Killer App

It seems that Apple’s MobileMe has finally got it’s killer app in the form of its new ‘Find My iPhone’ feature. I have never been tempted to subscribe to MobileMe so far as none of the features seemed too attractive. For example, is the automatic synchronization of contacts really a big deal when the contacts synch up just fine each time I connect to my MacBook anyway? However, as someone who has lost an iPhone before, the ability to track it down (at least to an approximate area) is very attractive. And although experiences like this are probably somewhat ill advised, it is still a very cool story!

Tags: ,

Eclipse/Clearcase plugin error

I’m working with Eclipse and ClearCase at the moment, using the plugin from here:

Unfortunately, Eclipse keeps throwing up an error saying:
java.lang.IllegalArgumentException: Argument not valid: Could not get status information from view

I think I have finally found the cause. It seems ClearCase doesn’t always start up properly on my local PC. When that happens, I have found that manually starting it seems to stop the Eclipse errors. To manually start, go to
C:\Program Files\Rational\ClearCase\Service.EXE (or your lcoal install location)
And select the “Start ClearCase Service” option.

Tags: , , ,

TheServerSide Java Symposium – Day 2

Day 2 at TSS Java Symposium.

The highlights of the second day at TSSJS2009 were a couple of interesting talks from Rod Johnson (Mr Spring) and a talk on Groovy from Scott Davis (

I have included links to some of my (limited) notes below, which includes links to the actual presentation slides (PDFs) where available.

Keynote: How Spring Fits into the Java Landscape – Rod Johnson

Spring for the advanced developer – Rod Johnson

The Amazing Grrovy Weight Loss Plan – Scott Davis

Tags: , , ,

JavaFX Plugin for Eclipse – too buggy?

After attending a meetup on JavaFX last month, I have been trying to get more familiar with the technology. I know that NetBeans is the ‘recommended‘ IDE for JavaFX, but I am an Eclipse devotee and thought that surely anything NetBeans can do Eclipse can do. Not in this case it seems.

Some simple JavaFX script just don’t seem to work with the Eclipse plugin. For example, the following snippet:

Stage {
    title: "Nodes"
    scene: Scene {
        fill: Color.LIGHTBLUE
        width: 220
        height: 170

Causes the following error:

incompatible types found: integer required: com.sun.javafx.runtime.location.FloatVariable

The same snippet compiled and ran straight off when I tried it before in NetBeans.

The only posting on it I could find is here. I took the advice and downgraded to JavaFX 1.0, which seems to have done the trick for now. If anyone out there has any suggestions on better solutions/fixes, I would love to hear them.

This isn’t the first time I’ve spotted some better GUI related functionality in NetBeans than in Eclipse (e.g. I briefly mentioned the NetBeans GUI Builder tool a while ago). There is no chance of me stopping using Eclipse completely, but maybe I will start using both…

Tags: , , , ,

Oracle Coherence

I had the chance today to attend a presentation at Oracle about their Coherence product. Basically, Coherence is a data caching tool. More specifically, it is an in-memory data grid solution that allows you to scale applications by partitioning data in memory across multiple servers. Servers can be easily added for better performance and can of course deal with servers going down (planned or unplanned) with no loss of data.

All in all, I have to say that it all looked like a very neat application. It is similar to Gigaspaces, but I suspect that since it is backed by Oracle, it is better supported.

The big question is, would I actually use it in a project? The answer is, if the project required access to a large amount of data and response times, scalability, availability and reliability were all critical requirements, then it would certainly be on the list of possible components. I can think of several real-time, mission critical trading applications that I have worked on in the past where Coherence could have been a useful tool.

One question I had was whether or not Coherence could be used with Hibernate, and in particular if it could be introduced to an existing application. After all, most performance problems don’t arise until well into the development of an application; Often when too much design and coding has been done to do a fundamental redesign.

For example, I am working on a Java/Spring/Hibernate web based application with a small but rapidly growing user base. If, in the future, performance becomes an issue, could Coherence be introduced to provide all the benefits that the folks at Oracle were talking about today? Could we introduce Coherence in to the architecture without fundamentally changing the data access mechanism (which lets face it, is not really an option at any stage other than the design or very early development)?

I think the answer is yes, but with caveats. The solution lies in using Coherence as Hibernate Level 2 Cache. The caveat is that this approach does not bring the same benefits as using Coherence as the primary data source in an application, like you would if you were using Coherence as an original, founding member of your architecture.

However, as the Oracle docs say, Hibernate is ‘the optimal choice for accessing data held in a relational database where performance is not the dominant factor’. So I guess if performace is likely to be an issue, it is best to think about it as early as possible, i.e. before picking the database technologies…