Re: Getting Sprung with Spring

Andy Oliver: “I doubt Spring will completely fade with the dawn of EJB3, since the prepackaged functionality is useful in other areas. I am, however, doubtful that it will continue to be useful for ORM-based persistence as the built in features of session management and all are more efficient and generally nicer (and will probably work better with a variety of Appserver environments). Spring has a useful place as a cross-appserver stop gap until JDK 1.5 is more widely deployed, but its Hibernate3 support needs some serious rethink especially HibernateTemplate. For the reasons above I would avoid HibernateTemplate and friends when using Spring and Hibernate3 until it has been reworked.”

This is just the conclusion of a long article, and you should really read it all. It has some good points and some not so good ones, in particular the conclusion quoted above.

For one thing, I am pretty sure Spring is not going to fade away, EJB3 notwithstanding, any time soon. Rather, it’s EJB3 that has to face an uphill battle. At the moment, Spring is gaining a very large mindshare and I find it extremely improbable that EJB3 will unseat it, in particular since Spring — as Andy acknowledges — has so much more to offer.

Nor do I think that Spring is a stop-gap solution. And I don’t see how JDK 1.5 can close that gap, per se. But maybe here Andy is referring to J2EE 1.5, or JEE 5, or whatever it is going to be called.

I do somewhat agree on the issue of Hibernate3 support. However, with Spring’s current support for Hibernate2 and Hibernate3, I can move a project from the former to the latter just by changing package names and recompiling, while starting to adopt Hibernate3’s features incrementally, which I already did without pain. This is a huge advantage, in my opinion.

3 Responses to “Re: Getting Sprung with Spring”


  1. 1 Andy

    You can accomplish the same thing RE: Hibernate 3 upgrade by doing the equivilent of “g/net\.sf\.hibernate/s//org\.hibernate\.classic/g” regardless of Spring. Thus Spring offers no real advantage in the Hibernate space. I was saying JDK 1.5 meaning, you can use the EJB3/annotations stuff with JDK 1.5 (god I hate Sun’s stupid fascination with bizzarre numberology). Since for Hibernate this is really just about a different API not actual new functionality, it is a pretty safe bet so far as production stability. Its also no longer a moving target really. I stand by my notation that Spring offers very little to Hibernate3. I suggest that it complicates H3 use on recent versions of WebSphere as in my experience it is much simpler to get H3+Spring to work on WS 5.1-6.0 rather than H3. I did not suggest one way or another whether non-ORM based Spring should be used as that would be somewhat outside my experience. It might not be my choice because I dislike XML configuration particularly hierarchial embedded XML configuration, but I suppose if there was something I needed in Spring’s library of functionality, why not? I should note that JDK 1.5 (or JDK 5 if you care about Sun’s weird number fascination/marketing) indeed seems to be more stable in high capacity environmnets than is 1.4 due to the rewritten GC (1.42 parallel GC is actually a bit buggy) even if 1.5 introduced some odd new Hotspot issues. Organizations are likely to notice performance increases from JDK 1.5 and thus could consider beginning to use JDK 1.5 features such as annotations.

  2. 2 Andy

    I suggest that it complicates H3 use on recent versions of WebSphere as in my experience it is much simpler to get H3+Spring to work on WS 5.1-6.0 rather than H3. — uh strike that, reverse it (H3 works fine on 5.1/6.0 H3+Spring is a pain on 5.1/6.0)

  1. 1 Agylen » Home office addition

Leave a Reply