• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Difference between EJB1.0 , EJB1.1 and EJB2.0 & About CMP

 
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
1) What is the basic difference between EJB1.0, EJB1.1 and EJB2.0 in the EJB Structure(ie. in the Home interface, Remote Interface and Bean Class).
I knew that in EJB2.0 features Message Driven Bean,local interface.
2) Is it possible in EJB2.0 to define two tables in a CMP. If it so please give the sample programs.
Thanks & Regards,
M.S.Raman.
 
Ranch Hand
Posts: 919
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you can check out the differences in the different specifications:
see here
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In brief, the EJB 2.0 specification introduces these new features:
Message-driven beans
1. An improved architecture for container-managed persistence
2. Container-managed relationships for entity beans with container-managed persistence
3. Local interfaces
4. Enterprise JavaBeans Query Language
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Basic differences:
1.0:
- no mandate that Entity EJB must be supported by EJB container
- no Message Driven Bean
- EJB communication backbone uses RMI-JRMP
- no CMP Entity EJB
- no Deployment Descriptor xml file, use compiled class, then serializes it into flat file (binary).
1.1:
- Entity Bean must be supported by EJB container
- no Message Driven Bean
- has CMP, but never describe how to configure relationship between CMP EntityEJBs, this depends on container tool provided by vendor
- RMI-IIOP is suggested for EJB communication
- Deployment Descriptor xml file is introduced
2.0:
- Message Driven Bean is introduced
- With CMP, you can configure the relationship between CMP EntityEJBs, in ejb-jar.xml
- EJB-QL for CMP EntityEJB query language
- RMI-IIOP is a must for EJB communication
 
Alexander Yanuar Koentjara
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
>2) Is it possible in EJB2.0 to define two tables in a CMP. If it so please give the sample programs.
Cannot. In Web Logic deployment descriptor, you must indicate one table in database for one CMP EntityEJB.
But, for your case, you have several alternatives:
1. declare the secondary table as another Entity EJB, then you can set up the relationship.
2. Use BMP, with DAO to access both primary & secondary table.
3. discard the secondary table, and use blob in main table instead. Then, you can use java serialization method to convert values of secondary table to binary. This only work for 1-1 relationship (example: profile as secondary table in customer table, profile contains name, address, company, telephone. Then you can make a class called ProfileValueObject, use serializable method to convert it into bytes, then store it as blob in customer table)
4. merge the table into one, work only for 1-1 relationship.
 
I don't get it. A whale wearing overalls? How does that even work? It's like a tiny ad wearing overalls.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic