Migrating enterprise bean code to the supported specification

Why and when to perform this task

Support for Version 2.0 of the Enterprise JavaBeans (EJB) specification is new for Version 5 of this product. Migration of enterprise beans deployed in Version 4.0.x of this product is not generally necessary; Version 1.1 of the EJB specification is still supported. Follow these steps as appropriate for your application deployment.

Steps for this task

  1. Modify enterprise bean code for changes in the specification.
    • For Version 1.0 beans, migrate at least to Version 1.1.
    • As stated previously, migration from Version 1.1 to Version 2.0 of the EJB specification is not required for redeployment on this version of the product. However, if your application requires the capabilities of Version 2.0, migrate your Version 1.1-compliant code.

      Note: The EJB Version 2.0 specification mandates that prior to the EJB container's executing a findByMethod query, the state of all enterprise beans enlisted in the current transaction be synchronized with the persistent store. (This is so the query is performed against current data.) If Version 1.1 beans are reassembled into an EJB 2.0-compliant module, the EJB container synchronizes the state of Version 1.1 beans as well as that of Version 2.0 beans. As a result, you might notice some change in application behavior even though the application code for the Version 1.1 beans has not been changed.

  2. Modify enterprise bean code for changes in deployment requirements.
    If the enterprise beans were previously deployed in Version 3.0.x of this product, modify import statements to match standard package names. In Version 3.0.2.x, the following standard packages were present under nonstandard names:
    javax.sql.*
    javax.transaction.*
    

    Any code using WebSphere data sources, including BMP entity beans and session beans that access databases, must be modified.

  3. You might have to modify code for some EJB 1.1-compliant modules that were not migrated to Version 2.0. Use the following information to help you decide.
    • Some stub classes for deployed enterprise beans have changed in the Java 2 Software Development Kit, Version 1.4.1.
    • The task of generating deployment code for enterprise beans changed significantly for EJB 1.1-compliant modules relative to EJB 1.0-compliant modules.
    • If the CMP beans write to databases with mixed-case table or column names and you used IBM VisualAge for Java, Version 3.5.x, to generate the original deployment code, you cannot simply reassemble the beans in this product. You must export the original EJB project from the VisualAge for Java product as an EJB 1.1 JAR. This preserves the metadata needed to generate the correct deployment code for mixed-case database tables and columns. For more information, see EJB deployment tool.

    For detailed information about source and binary compatibility between deployed versions, see "Resources for learning."

  4. Reassemble and redeploy all modules to incorporate migrated code.

Related concepts
Enterprise beans
Related tasks
Migrating a version 4.0 data access application to version 5.1
Using enterprise beans in applications
Related reference
Enterprise beans: Resources for learning



Searchable topic ID:   tejbmigr
Last updated: Jun 21, 2007 4:55:42 PM CDT    WebSphere Application Server Network Deployment, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/tejb_migr.html

Library | Support | Terms of Use | Feedback