Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / September 2006

Tip: Looking for answers? Try searching our database.

EJB 3.0 vs Spring

Thread view: 
Steve - 28 Sep 2006 16:04 GMT
I am considering using EJB 3.0 with an Application Server (e.g. JBoss) or Spring with a Web Server (e.g., Tomcat). In either case, I
plan to use Hibernate. What are the major pros and cons of each approach?

Thanks.

Steve
Daniel Dyer - 28 Sep 2006 21:47 GMT
> I am considering using EJB 3.0 with an Application Server (e.g. JBoss)  
> or Spring with a Web Server (e.g., Tomcat). In either case, I
> plan to use Hibernate. What are the major pros and cons of each approach?

I think that Rod Johnson's advice to use EJB if you need distributed  
objects (i.e. if you *really* need distributed objects and can justify  
that need) and avoid it if you don't is broadly sensible.  EJB3 has  
improved things greatly, particularly with entity beans, but it still  
might be a bit early to depend on it.  The JBoss implementation is in beta  
(beta 8 no less) and is buggy.  The JBoss website has the following  
disclaimer:

"NOTE: JBoss EJB3 is not a final implementation and it does not pass the  
EJB3 Compatibility Test Suite."

My experience with JBoss + Hibernate + EJB 3.0 was OK until I hit a bug  
that required an upgrade that quickly descended into a mess of seemingly  
irreconcilable inter-dependencies.

Furthermore, Sun currently don't seem comfortable recommending their Java  
EE 5 offering (Sun AS 9) over their J2EE 1.4 offering (Sun AS 8.2).  BEA  
WebLogic might be a better bet but it's not cheap.

You can use the Hibernate JPA EntityManager outside of an application  
server, which might be the way to go.  You still get to take advantage of  
all of the entity annotations.

Dan.

Signature

Daniel Dyer
http://www.uncommons.org

Danno - 28 Sep 2006 22:07 GMT
> I am considering using EJB 3.0 with an Application Server (e.g. JBoss) or Spring with a Web Server (e.g., Tomcat). In either case, I
> plan to use Hibernate. What are the major pros and cons of each approach?
>
> Thanks.
>
> Steve

Apples and Oranges...

You may want to ask which is better a JEE Container or a Spring
Container.  Also if you are interested in Spring, you may wanna sit
tight for a few more days (4 to be exact) because Spring 2.0 will
support JPA (EJB 3.0), as well as other persistence ORMs as part of
it's container.

I am a JEE Developer, but Spring sure has made me want to jump ship
with what they have to offer.....

http://static.springframework.org/spring/docs/2.0.x/reference/index.html

Thanks for bringing this up here, because this will make for an
interesting discussion.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.