Meaningless Drivel is fun!*
The moose likes BEA/Weblogic and the fly likes Difference between EJB1.0 , EJB1.1 and EJB2.0  & About CMP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Difference between EJB1.0 , EJB1.1 and EJB2.0  & About CMP" Watch "Difference between EJB1.0 , EJB1.1 and EJB2.0  & About CMP" New topic
Author

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

Malli Raman
Ranch Hand

Joined: Nov 07, 2001
Posts: 312
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.
George Brown
Ranch Hand

Joined: Sep 26, 2000
Posts: 919
you can check out the differences in the different specifications:
see here
susha pillu
Greenhorn

Joined: Jul 25, 2001
Posts: 8
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
Alexander Yanuar Koentjara
Ranch Hand

Joined: Jun 03, 2002
Posts: 31
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


===================================<br />Fear not, God know the best.<br />SCJP2 91%<br />SCWCD 89%<br />SCJD2 92% (143/155 pts)<br />SCEA Part I (89%)
Alexander Yanuar Koentjara
Ranch Hand

Joined: Jun 03, 2002
Posts: 31
>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 agree. Here's the link: http://aspose.com/file-tools
 
subject: Difference between EJB1.0 , EJB1.1 and EJB2.0 & About CMP
 
Similar Threads
EJB1.0 /1.1 What the exam reflecting
general question about ejb
EJB Doubt for Part I
J2EE documentation and Session Beans
session bean and CMP