![]() ![]() ![]() |
|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Deploying Enterprise Beans in Sun's J2EE Reference Implementationby
[Help |
API Docs |
Short Course|
Exercises]
This exercise takes you through the process of deploying the MusicCD entity bean and Inventory session bean into the J2EETM Reference Implementation container. Deploying is usually a major task in an of itself, and it is always application-server specific. If you are using an application server other than J2EE RI, you should consult that server's documentation for the details of how to deploy your beans. You will need to have the Prerequisites
Skeleton Code
Tasks
Save the two jar files from the skeleton code section above into your working directory. You should execute the next step from that working directory.
Start the
In
Select the MusicStore application from the list of deployed applications on the left-hand side of the
Follow the same procedure to add the
With the MusicStore application selected, choose the "JNDI" panel from the main portion of the
Now set up the database mapping for the MusicCD entity bean. You will have to select the "MusicCDBean" component from the left-hand window. Then select the "Entity" tab in the main window and press the "Deployment Settings" button to get the input dialog box. Set the database JNDI name to "jdbc/MusicStore" in this dialog, uncheck the boxes "Create table on deploy" and "Delete table on deploy", then press the "Generate SQL now" button.
The MusicStoreDB that you set up in the previous exercise uses a table called "MusicCD" to store the MusicCD beans. The SQL commands that the J2EE RI automatically generates does not use this exact table name, so you need to select each of the lifecycle methods and edit the SQL being generated for each to change them to operate on the MusicCD table.
In
You should see MusicStore application show up in the lower section of the Where help exists, the task numbers above are linked to the step-by-step help page. Solution Source
When you have sucessfully deployed the MusicStore application, your Demonstration
There is no expected behavior for this exercise, outside of the screen shots displayed in the help for each task. Next ExerciseExercisesShort CourseCopyright 1996-2000 jGuru.com. All Rights Reserved. |