Women in Technology

Hear us Roar



Article:
  POJO Application Frameworks: Spring Vs. EJB 3.0
Subject:   Spring and/or EJB3
Date:   2005-07-02 21:49:36
From:   markstg
First off, EJB 3 is a great move forward, however we have to remember its not even FINAL yet.


Secondly, I think that EJB3 and Spring could very well be used together? I could see this as a strategy for alot of shops that still like Spring, and have management that feels more comfortable with going with "standards" (whatever that really means nowadays).


EJB 3 Persistence will just be another supported Data Access strategy supported by Spring, as well as the EJB 3 Session Bean model might be used in favor of Spring-managed business services.
However, the IoC container provided by Spring is much more advanced than the very simple DI provided by EJB3. So for managing fine-grained objects, Spring is a clear winner in that space.
So DI for things like lists, maps, etc. are not supported in EJB3 (from what I can tell).


Spring's XML configuration is pretty sensible and its getting less verbose in the coming releases. Again, the Spring examples are not using the new shorthand XML notations.


In my personal opinion, Spring really was providing for the gaps in the EJB 2.x model... EJB3 will be loads better, EJB 3 persistence great... EJB3 Session Beans.. ok whatever, not really providing anything new there in my opinion.
I still alot of benefits to using Spring for an overall application framework, versus EJB3.

Main Topics Oldest First

Showing messages 1 through 1 of 1.

  • Spring and/or EJB3
    2005-07-03 22:39:02  MichaelYuan [View]

    Hmm, just a quick point -- EJB 3 and Spring both provide easy-to-use APIs on top of existing persistence solutions (Hibernate, Toplink, JDBC etc.) I do not think it is sensible to use EJB 3 as a persistence plug-in for Spring -- it forces two layers of abstraction and defeats the whole "standard" advantage of EJB 3.

    Of course, if you love Spring XML and have to tie your application architecture to Spring DI. Then, you should just use Spring and ignore EJB 3 altogether. :)