Results 1 to 5 of 5

Thread: EJB3 vs SpringFramework

  1. #1
    Join Date
    Feb 2007
    Posts
    102

    Default EJB3 vs SpringFramework

    An interviewer said that SpringFramework is more advantageous than EJB 2 while EJB 3.0 has a great improvement. He asked me what are the advantages of EJB 3.0 over SpringFramework.

    I do not think EJB and SpringFramework are mutual exclusive. They are an apple and an orange. How can we compare them?

  2. #2
    Join Date
    Sep 2004
    Posts
    1,086

    Default

    EJB3 comes with clustered remoting and distributed transaction capabilities out of the box. On the other hand, clustering is (afaik) not a part of the spec, it's just the implementation. Other then that, I'd say that there are no advantages.

    As a proof of concept I created an EJB3 look-alike containter using Spring + JNP + JBoss-Remoting in a couple of hours. From outside it looks like a JBoss server, you can make JNDI lookups and get remote stubs that look and feel like EJB3 stubs.

  3. #3
    Join Date
    Aug 2004
    Posts
    2,715

    Default

    EJB3 has made a step towards IoC. So comparable features would be injecting dependencies, transaction management, remoting capabilities (at least thats what comes to my mind right now).

    The IoC-capabilities of EJB3 are inferior in comparison to Spring. Concerning transactions, Spring pretty well sticks to the standard, but has some nice extensions here, too. In remoting Spring provides more possibilities while EJB3 is stronger towards clustering (as already stated by dejanp). Also EJB3 supports distributed transaction which Spring does not. But I do not think that this is a very desirable feature to have.

    That said, I agree to your statement that EJB3 and Spring are not mutually exclusive. As of comparing them: maybe not in whole, but some common features are indeed comparable.

    Regards,
    Andreas

  4. #4
    Join Date
    Oct 2006
    Posts
    15

    Default

    You can also take a look at the source code, you will realize it is meant to make working with EJB's easier. I've only got as far as incorporating it into my architecture but only did the config for local, not remote beans. It was very good though and they had liked it..

  5. #5
    Join Date
    Dec 2009
    Location
    Berlin
    Posts
    2

    Default Spring an EJB Lite Container in the next future

    Hi folks,

    does anybody know if spring will be one implementation of EJB Lite, part of the JEE 6 specification? In my opinion it will go the same way as Hibernate did with JPA, just being one implementation.

    Any cross references are welcome.

    TIA

    Frank

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •