Results 1 to 3 of 3
  1. #1
    javaplus is offline Member
    Join Date
    Nov 2007
    Posts
    97
    Rep Power
    0

    Default Basic question about EJB

    Hi

    I have a basic question. Whats the main difference between EJB 2.0 and EJB 3.0? I have done some work in EJB 2.0 but now I think I should switch to EJB 3.0.

    Thanks.

  2. #2
    linuxswan is offline Member
    Join Date
    Mar 2008
    Posts
    28
    Rep Power
    0

    Default

    EJB 2.0 and EJB 3.0 both help you in the same way for what you pay for the EJB container. The central point about EJB 3.0 is that it has simplifed the life of developers.
    How ?
    1) Deployment Descriptors have been replaced by annotations that can be done in Java Code itself .
    2) The Concept of using POJO probably inspired from the popularity of Spring Framework has been introduced simplifying the coding process.
    3) Now you need not code the home and component interfaces that were pretty complex when you consider some simple business implemention. That was a real overhead in ejb 2.0 .

  3. #3
    linuxswan is offline Member
    Join Date
    Mar 2008
    Posts
    28
    Rep Power
    0

    Default

    1. As part of ejb2.0 we are using EntityBeans for to access the database.But as part of ejb3.0 we are using the JPA(Java Persistance API) for to access the database and some portability issues.But this Api is same as some orm products like hibernate, Toplink, JDO. But JPA is better than these orm products in case of portability.Because it is using the same api called JPA.

    2. EJB2.0 has Deployment descriptors but in EJB3.0 has no Deployment Descriptors.

    3. EJB2.0 we have to write Home and Remote Interfaces But in EJB3.0 No need to write Home and remote interfaces.

    4. In EJB3.0 We are identifying all entities with '@' symbol.

Similar Threads

  1. Question mark colon operator question
    By orchid in forum Advanced Java
    Replies: 9
    Last Post: 12-19-2010, 09:49 AM
  2. Basic Applet
    By jkswebsite in forum Java Applets
    Replies: 4
    Last Post: 01-13-2008, 10:14 PM
  3. Very basic question
    By gvi in forum New To Java
    Replies: 2
    Last Post: 10-30-2007, 07:30 PM
  4. basic question about files
    By oregon in forum New To Java
    Replies: 1
    Last Post: 08-05-2007, 03:34 AM
  5. help with basic example
    By fred in forum New To Java
    Replies: 1
    Last Post: 07-20-2007, 06:45 PM

Posting Permissions

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