Sun Java System Application Server Enterprise Edition 8.2 Upgrade and Migration Guide

ProcedureTo Verify if a Bean Can be Migrated

  1. From the ejb-jar.xml file, go to the <cmp-fields> names and check if the optional tag <prim-key-field> is present in the ejb-jar.xml file and has an indicated value. If it does, go to next step.

    Look for the <prim-key-class> field name in the ejb-jar.xml, get the class name, and get the public instance variables declared in the class. Now see if the signature (name and case) of these variables matches with the <cmp-field> names above. Segregate the ones that are found. In these segregated fields, check if some of them start with an upper case letter. If any of them do, then migration cannot be performed.

  2. Look into the bean class source code and obtain the java types of all the <cmp-field> variables.

  3. Change all the <cmp-field> names to lowercase and construct accessors from them. For example if the original field name is Name and its java type is String, the accessor method signature is:

    Public void setName(String name)Public String getName()

  4. Compare these accessor method signatures with the method signatures in the bean class. If an exact match is found, migration is not possible.

  5. Get the custom finder methods signatures and their corresponding SQLs. Check if there is a Join, Outer join, or an OrderBy in the SQL. If yes, you cannot migrate, because EJB QL does not support Join, Outer join, orOrderBy.

  6. Any CMP 1.1 finder, which used java.util.Enumeration, must now use java.util.Collection. Change your code to reflect this. CMP2.0 finders cannot return java.util.Enumeration.

    Migrating the Bean Class explains how to perform the actual migration process.