Deploying Enterprise Beans in Sun's J2EE Reference Implementationby
[Help |
API Docs |
Short Course|
Exercises]
|
| MusicCDBean | MusicCDBean | ejb/MusicCD |
| InventoryBean | InventoryBean | ejb/Inventory |
| InventoryBean | ejb/MusicCD | ejb/MusicCD |
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 deploytool, select "Tools/Deploy Application..." from the menu. Check the box to "Return Client Jar", otherwise just accept all the defaults and step through the wizard. Select the "Finish" button at the end.
You should see MusicStore application show up in the lower section of the deploytool screen in the panel labeled "Server Applications". You have successfully deployed your beans!.
Where help exists, the task numbers above are linked to the step-by-step help page.
When you have sucessfully deployed the MusicStore application, your deploytool screen should look something like this:
There is no expected behavior for this exercise, outside of the screen shots displayed in the help for each task.
Copyright 1996-2000 jGuru.com. All Rights Reserved.