+

Search Tips   |   Advanced Search

Migrate enterprise bean code to the supported specification


Support for the EJBs 3.0 spec is added for this product.

There should not be migration issues associated with using EJB 3.0 beans. Existing applications should continue to run as-is and compile without error.

The EJB 3.0 specification has deprecated the use of EJB 1.1 style entity beans. While using EJB 3.0 modules in WAS has not yet been deprecated, we are encouraged to start migrating to Java Persistence API (JPA) or JDBC.

Follow these steps as appropriate for the application deployment.

 

  1. Modify enterprise bean code for changes in the specification.

    • we need to migrate the V1.1 beans to V2.x beans and redploy them on WAS ND. .

      The EJB V2.0 specification mandates that prior to the EJB container's running a findByMethod query, the state of all enterprise beans enlisted in the current transaction be synchronized with the persistent store. This is done so that the query is performed against current data. If V1.1 beans are reassembled into an EJB 2.x-compliant module, the EJB container synchronizes the state of V1.1 beans, as well as that of V2.x beans. As a result, we might notice some change in application behavior even though the application code for the V1.1 beans has not been changed.

  2. Ensure WAS 32-bit to 64-bit compatibility. This is not an issue for a pure Java application. However, if the application code utilizes the Java Native Interface (JNI) code, be aware of the following: the JNI allows Java code running in a virtual machine to operate with applications and libraries written in other languages, such as C, C++, and assembly. Therefore, if the J2EE application uses JNI in a 32-bit environment, the code must be recompiled in the 64-bit environment. It is possible that the JNI calls could be different after the compilation, as the JNI specifications can change from version to version.
  3. Reassemble and redeploy all modules to incorporate migrated code.


Migrate enterprise bean code from V1.1 to V2.1
Adjusting exception handling for EJB wrapped applications migrating from version 5 to version 7

 

Related concepts


Enterprise beans

 

Related tasks


Migrate applications to use data sources of the current Java EE Connector Architecture (JCA)
Task overview: Using enterprise beans in applications