• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Spring comparison

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are always comparing technologies as professional IT-ers.

Which of the two is the most performant, the most lightweight, the best option for small/large-scale applications...

How do the authors feel about the constant comparison of EJB3 vs Spring?

Can the two be really compared and is there an obvious line of telling 'For this project it's obvious you use Spring/EJB' or is it more about which product do I like the most?

Regards
 
author
Posts: 24
5
Spring Tomcat Server Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, as always with these sorts of open-ended comparisons, it's helpful to try to be specific. EJB3 (and EJB 3.1) provides a component model for services that manipulate state (most of the time using JPA (and JPA2). The component model assumes that you might need to expose your EJBs for remote clients using SOAP or RMI, and it assumes that you might need to have declarative transactions. It assumes you might want to handle JMS messages in a bean, too. It assumes that you are content working in an application server, which doesn't promote unit testing or portable code. That's (broadly speaking) about it.

If you simply want service objects that are able to manipulate JPA state and provide declarative transactions and be exposed as web services, than Spring provides all of that *and* you can unit test it naturally and you enjoy full support for deploying to other environments like clouds and web servers, not just Java EE application servers.

However, Spring is a much, much, much larger superset than EJB. "Spring" also provides batch processing, web frameworks, much stronger RDBMS support - JPA1, JPA2, JDBC, JDO, etc, mobile client support, big data (Neo4j, CouchDB, Riak, Redis, MongoDb, etc.), Hadoop support, and numerous simplifying APIs for other APIs that EJB has no particular support for, including JDBC, iBatis, etc. Technically there is no reason to use EJB3 or EJB3.1, there is nothing that it can do that Spring can't and a whole world of things that Spring can do that EJB (and Java EE6) can't.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree that we are able to do almost anything with Spring (and more).
But what about scalability and performance ?
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Dariusz Skrudlik wrote:I agree that we are able to do almost anything with Spring (and more).
But what about scalability and performance ?



Since your code and application is now POJO, then is Java scalable or performant. It really now comes down to that and not to do with Spring itself. Spring is out there in very large applications, so it is scalable and performant.

Mark
 
reply
    Bookmark Topic Watch Topic
  • New Topic