File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Advantages of EJB compare to JDBC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Advantages of EJB compare to JDBC" Watch "Advantages of EJB compare to JDBC" New topic
Author

Advantages of EJB compare to JDBC

rakesh kumar nampally
Ranch Hand

Joined: Feb 03, 2007
Posts: 46
Hi All,

What is advantage of using EJBs compare to using JDBC directly keeping Transaction Part aside.


thanks & regards, Rakesh
Harinath Kuntamukkala
Ranch Hand

Joined: May 17, 2005
Posts: 37
Business logic is in a re-usable component on the server, so you can easily re-use it in other webapps, or in other client types (e.g. PDA, Swing client)
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Some people also prefer not having to deal with SQL directly, I personally find that a fairly weak reason but YMMV

Cheers,
Martijn


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31052
    
162

Rakesh,
Since you are comparing to JDBC, you would mean entity beans (EJB 2.1) or JPA (EJB 3.0). Both are intended to be mapping frameworks to insulate you from the database. JPA/EJB 3 does a much better job at that.

Personally, I don't like the idea of putting business logic in an entity bean. There's too much EJB specific stuff in there to be easy to deal with. This situation improves in JPA.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Advantages of EJB compare to JDBC