[ajug-members] Opinions on a project re-write - To EJB3 or Not

Thomas, Dave dthomas at tandbergtv.com
Thu May 29 11:01:07 EDT 2008


I think it's mostly a matter of religious preference.  IMHO Spring has had inroads with the agile folks, EJB with the enterprise folks.

> A) Ease of configuration. 
Though you would think EJB3 would win here, I was unlucky in finding it harder.  Spring config files I thought were a piece of cake to learn and be productive easily.  Maintaining them was a chore and you must to treat these XML files as source code.

Bear in mind that EJB3 is fairly new in comparison.  Spring documentation online and in print is ample and clear.  Sun documentation is marginal.  Not sure about JBoss (as I've only used it with EJB2) but that could make a big difference.

> B) Customization and scaling.
Spring has a bigger feature set.  EJB scalability is a central part of the spec, so it's more a question of how well you think JBoss will scale for you.  Since this is one area where they have a symbiotic relationship, maybe consider doing an analysis of your Spring app to see if using the EJB3 spec will give you the scalability you're looking for.

> C) Ease/Speed of development/ Simplicity. 
"The simplest thing that can possibly work" is an agile motto, which inspired Spring, which ate JavaEE's lunch in the EJB2 days.
If you do a lot of unit testing, your development will be fast.  Spring makes this somewhat easier than EJB3, IMHO.  I don't think anyone would dispute that unit testing methodologies are far better documented in Spring than EJB3.  Whoever writes the first book on test-first EJB3 will make a killing (hint hint).

> D) JMS support
Haven't used either myself, but I've read in their documentation that Spring has goodies that simplify JMS and eliminate boilerplate code.  JMS is, however, a JavaEE spec, so I'd speculate JMS in Java EE 5 is more mainstream.

Hope that helps.

-----Original Message-----
From: Rick [mailto:rickcr at gmail.com]
Sent: Wed 5/28/2008 7:09 PM
To: ajug-members at ajug.org
Subject: Re: [ajug-members] Opinions on a project re-write - To EJB3 or Not
 
The main things factors I'm concerned with are:

A) Ease of configuration. Who really wins out here? Setting up spring for
all your IoC needs seems to be a be a bit of pain. The amount of
configuration in EJB3 seems to be a bit easier - but yes you do have to
configure some custom container components so you aren't totally out of the
woods there.

B) Customization and scaling. Assuming I'm using a full blown jee container
(JBoss4) regardless of the solution chosen - Spring or EJB3 - does one side
win out here? I'd assume the EJB3 side would allow greater control of things
like stateless session bean pooling, etc.

C) Ease/Speed of development/ Simplicity. One thing I can't stand is
over-architected applications (you know the ones - factories of factories -
5 service layers - etc... all for some form of 'super flexibility' that
rarely is ever need. I want to keep this mid tier layer fast, simple, and
easy to maintain.)

D) JMS support.




On Wed, May 28, 2008 at 8:18 PM, Burr Sutter <burr.sutter at jboss.com> wrote:

>  Spring can lay claim to have much richer AOP (via AspectJ) capabilities,
> however, the average shop normally doesn't need to go much beyond what EJB3
> offers in that particular area.
>
> Spring also allows you to switch out all of your implementations on various
> container capabilities such as security, transactions, persistence, etc
> while the average vendor-supported Java EE server needs you to stick with
> their implementations - otherwise, they can't really help you when you call
> and complain about a bug.
>
> If you are willing to bet on things like Struts or Hibernate then Spring is
> also a safe bet, especially if you don't get to crazy about using a lot of
> features that your favorite/standardized container doesn't provide.
>
> With my "Java EE user" hat on, while, we all love open source because we
> can self-support, we don't really wish to get into the mode of fixing any
> framework's internal issues and would rather find a vendor who will make
> those corrections on our behalf.
>
> Rick wrote:
>
> On Sun, May 25, 2008 at 5:05 PM, Thomas, Dave <dthomas at tandbergtv.com> <dthomas at tandbergtv.com> wrote:
>
>
>
>   The difference there (in my limited experience) is that Spring is more feature rich and powerful, the EJB spec is simpler albeit less well-documented.
>
>
>  Is there something I'll particularly miss going with EJB3 instead of
> Spring? From what I can gather EJB3 does happen to be more simple than
> using Spring (which is sort of ironic since pre-EJB3 of course it was
> the other way around.) Several people have mentioned how Spring is so
> 'feature rich' but, at least at the moment, I can't think of anything
> that I'll be missing using the standard EJB3 stack instead of Spring?
>
>
>
>
> _______________________________________________
> ajug-members mailing list
> ajug-members at ajug.org
> http://www.ajug.org/mailman/listinfo/ajug-members
>
>


-- 
Rick
**********************************************************************

This email, its content and any attachments is PRIVATE AND 
CONFIDENTIAL to TANDBERG Television, Part of the Ericsson Group. 
If received in error please notify the sender and destroy the original 
message and attachments.

www.tandbergtv.com
**********************************************************************



More information about the ajug-members mailing list