In this step you add a CMP field to the Recording bean to store the rating information collected by the Statistics bean, and change the way tables are created by WebLogic. The tasks in this step are:
Note. If you stepped off the field and used Change declaration to rename the field, select the rating declaration in Design View and go to the Property Editor to change the ejbgen:cmp-field tag's column property to rating. (The name of the CMP field and the corresponding column name can be different, but for consistency reasons you should give them the same name here.)
To Change the create-tables Setting
When you first used the Recording bean, WebLogic automatically created the corresponding table with the necessary columns to hold the defined CMP fields, as dictated by the CreateOnly setting in the create-tables property in the Property Editor. This setting does not automatically re-create the table if the definition of CMP fields changes, that is, if you add a new CMP field or change the definition of an existing CMP field. Since you have added an additional CMP field above, you must either manually add the column to the table or tell WebLogic to drop the original table and create a new table. You will do the latter here:
If you encounter a build error related to the ejbgen:ejb-local-ref tag in Statistics bean, make sure that you have specified the Recording bean's name correctly. If you encounter build errors related to the component methods, verify that the methods have been defined correctly. A build error might be followed by a deployment error, in particular for WebAppOne_Standard and related to an unresolved ejb-link. The link cannot be resolved because the EJB JAR was not created. Fixing the build problem should resolve this deployment error. If you encounter deployment errors that seem to be related to one of the web applications, make sure that you build the EJB project and not the entire application (because the application contains page flow applications that have different EJB dependencies from what you have created in this step).
Also, you can compare your code for Statistics Bean and Recording bean with the solution source code located at [BEA_HOME]\weblogic81\samples\platform\tutorial_resources\EJBTutorial\solutions.
Click one of the following arrows to navigate through the tutorial: