Application Server 6.x supports EJB 1.1, and the Application Server 8.x supports EJB 2.0. Application Server 9 supports EJB 3.0. Therefore, both can support:
Stateful or stateless session beans
Entity beans with bean-managed persistence (BMP), or container-managed persistence (CMP)
EJB 2.0, however, introduces a new type of enterprise bean, called a message-driven bean (MDB).
J2EE 1.4 specification dictates that the different components of an EJB must be grouped together in a JAR file with the following structure:
META-INF/ directory with an XML deployment descriptor named ejb-jar.xml
The .class files corresponding to the home interface, remote interface, the implementation class, and the auxiliary classes of the bean with their package
Application Server 6.x uses this archive structure. However, the EJB 1.1 specification leaves each EJB container vendor to implement certain aspects as they see fit:
Database persistence of CMP EJBs (particularly the configuration of mapping between the bean’s CMP fields and columns in a database table).
Implementation of the custom finder method logic for CMP beans.
Application Server 6.x/7.x and Application Server 9do not handle migrations in the same way, which means that some XML files must be modified:
The <!DOCTYPE definition must be modified to point to the latest DTD URL (in the case of J2EE standard DDs, like ejb-jar.xml).
Replace the ias-ejb-jar.xml file with the modified version of this file (for example, file sun-ejb-jar.xml, which is created manually according to the DTDs). For more information, see http://wwws.sun.com/software/dtd/appserver/sun-ejb-jar_2_1-1.dtd
Replace all the <ejb-name>-ias-cmp.xml files with one sun-cmp-mappings.xml file, which is created manually. For more information, see http://wwws.sun.com/software/dtd/appserver/sun-cmp-mapping_1_2.dtd
Optionally, for CMP entity beans, use the capture-schema utility in the Application Server’s bin directory to generate the dbschema. Then place it above the META-INF directory for the entity beans.
As mentioned in Chapter 4, Understanding Migration, while Application Server 6.x supports the EJB 1.1 specification and Application Server 8 supports EJB 2.0, Application Server 9 supports the EJB 3.0 specification.
Although the EJB 1.1 and 2.0 specification continues to be supported in the Application Server, the use of the EJB 3.0 architecture is recommended to leverage its enhanced capabilities.
For detailed information on migrating from EJB 1.1 to 2.0 to EJB 3.0, please refer to Chapter 5, Migrating EJB