No benefit in migrating from Spring to Java EE

Lately Oracle is providing a podium for people (you know who you are) who are telling you that you should migrate from Spring to Java EE. The first articles making that case started appearing a year and half or so ago but it seems Oracle isn’t giving up. They should, because the case their minions are making on their behalf is so flawed that it’s an insult to common developer sense. I’m not making the case that Spring is better (that would be a different article), I just want to point out that you have nothing to gain from performing the migration they are proposing.

The article that accompanies the podcast episode starts out spreading some FUD about Springsource / VMware as being not trustworthy. I think Vmware are as reliable as any other company, and certainly not less reliable than Oracle or any of the other application server vendors out there.  Jumping ship to another vendor will not improve your situation in that regard.

The authors try to frame Springsource as not caring about standards. I would say that they do care about standards, just not the way Oracle wants them to. Observers of the Java ecosystem know that Oracle has been offending people left and right.  Springsource took active part in JSR 330, on dependency injection. Springsource, like others, just isn’t asking ‘how high?’ when Oracle tells them to jump. The Java Community Process has been having problems for quite a while now. It has been like a political party that is fighting within. Voters will leave them en masse. In general, any standard must also be the de-facto standard, or it is worthless. If a de-facto standard is not approved by some standards body, that is a testament as to how well the standards body is functioning.

Then, the authors argue that Java EE is more lightweight than the Spring portfolio because the size of a warfile can be kept smaller. They leave out the part where you then have to deploy into a Java EE appserver which is as heavyweight as it gets. So you’re exchanging ‘big war file’ for ‘big app server’, hardly a win.

After that the article mumbles on about how Java EE 6 can now also do some of the things Spring Framework has been providing for god-knows-how-long, such as AOP and an integration testing framework. I suspect you are as unimpressed by this as I am.

I’m left here wondering why seasoned developers would voice this opinion so actively. By now I’m sure they know very well when it is worth doing a big migration from Tomcat to a Java EE appserver. The case they’re making for it is unconvincing, and they know it.

, , ,

9 Responses to No benefit in migrating from Spring to Java EE

  1. Andre June 6, 2012 at 2:39 pm #

    Nice response Hans. I found it striking as well that they tried using Spring’s support for older frameworks as an argument to upgrade from the “legacy” Spring stack. Who knows what will happen in the coming years, but to me it is the Hibernate vs JPA crap all over…

    Use what works for you, use common sense and not weasel rhetoric like “always use the standard, because I really don’t know what I am talking about anyway”


  2. Eelco June 6, 2012 at 4:13 pm #

    Hans, I totally agree that migrating of applications from one technology stack to another hardly ever makes sense. But 9 years ago those kind of articles were also written in favor of the Spring framework. So, I think it’s kind of funny the authors decided to turn it the other way around. The underlying message is (to my humble opinion), that Spring has had it’s use to change the way Java applications are developed, but now Java EE has some of the same features, making Spring kind of legacy ;-). So, up to the next framework that is totally different: Let’s Play!

  3. Hans Westerbeek June 6, 2012 at 4:33 pm #

    Eelco, there’s a big difference. Moving from J2EE to Spring actually had benefit. Moving from modern-day Spring to JEE 6 gives you nothing extra. Au contraire, it is a step back in time because you make it harder for yourself to use any of the other libraries that integrate nicely with Spring.

    So yes, Indeed Java EE has some of the same features, and I know that these guys are trying to tell you “you don’t really need Spring anymore”. But the world has moved on since DI, and the SpringSource guys have moved on too.

    The Spring ecosystem is a superset of Java EE, just like Hibernate has always been a superset of JPA. I fail to see why I would should use the inferior tool if the superior tool is well-known and supported.

  4. Steven Dick June 6, 2012 at 5:13 pm #

    In my opinion, migrating in either direction is a waste of time & energy. If you’ve made the investment in either Spring or EE 6 you may as well stick with it. Where’s the business value in migrating? At the high-level they offer the same things. Horse for courses.

  5. Robert Reiz June 8, 2012 at 2:47 pm #

    Good Article. I enjoyed reading. I guess I think the same and agree with all points. I don’t think that Spring is lightweight anymore. But they are still doing a good job. And I trust SpringSource / VMWare more than Oracle.

  6. S M September 16, 2013 at 9:21 pm #

    This is very logica blog compared to Spring to JBoss. Here’s why and how. Why do you need heavy lifting JEE when Spring that can have functionality and use any container to host it?


  1. Questa settimana in Grails (2012-23) - - Il blog di Luca Canducci: notizie, tips e nuove tecnologie dal mondo dell’IT. - June 12, 2012

    […] No benefit in migrating from Spring to Java EE […]

  2. An Army of Solipsists » Blog Archive » This Week in Grails (2012-23) - June 12, 2012

    […] No benefit in migrating from Spring to Java EE […]

  3. An Army of Solipsists » Blog Archive » This Week in Grails (2012-23) - November 18, 2014

    […] No benefit in migrating from Spring to Java EE […]

Leave a Reply