EJB Deployment   «Prev  Next»

Deploy Hello Bean[Session Bean] - Exercise

Objective: Deploy the Hello bean in the J2EE platform.

Exercise scoring


You will receive 2 points for this exercise. The exercise is auto-scored; when you have completed the exercise, click the "OK, I'm Done" button to receive full credit.

Background/overview


This lesson described the process of deploying the Hello bean. In this exercise you will simply perform the required steps as they were described.

Download files


All the files required were either downloaded or created as the part of the previous exercise. They are in the hello directory.

Instructions


Open a window and run the j2ee -verbose command. Make sure you specify the -verbose flag so that the platform displays any output directly to the window. You can view the messages displayed in this window to see what the platform is doing.
If the -verbose flag is not specified, the output to <standard out> and <standard error> are written to log files. See the J2EE documentation for the description and locations of the log files.
Start another window and make the hello directory current. Invoke the deploytool command. Follow these steps:
  1. If the HelloApp is not loaded automatically, select Open Application... from the File menu. Browse for the file HelloApp.ear and when selected, press the Open Application button.
  2. Select Deploy Application from the Tools menu.
  3. In the Deploy HelloApp window, verify that the server is localhost, click the Return Client Jar File button and then click Next. Note the directory and name of the client jar file.
  4. Enter the JNDI name "MyHello" when prompted. (Don't forget to press Enter after entering the name) Click the Next button to continue.
  5. Select Finish. The application will now be deployed. Click the OK button when the deployment is complete.
  6. Verify that HelloApp is indicated in the Server Application window when complete.

Hints

Make sure that all the steps above were executed completely and without error. Errors will be shown in either the J2EE window or the deploytool window. Revisit the simulation if there are any steps that were not clear. Read the J2EE documentation for more insight into what happens in this process.
If you have a problem that you can't resolve, J2EE has a cleanup procedure that removes all deployed beans and cleans up any temporary files. This often fixes strange problems. The procedure is as follows:
  1. Shut down the deploytool.
  2. Shut down the J2EE platform by killing the J2EE process.
  3. Execute the command cleanup.
  4. Restart the J2EE server.
  5. Restart the deploytool.
  6. Repeat the steps in the instructions for the exercise.
If you have any problems you can't fix in this exercise, please contact a tutor.

Submitting your exercise


When you have completed this exercise, click the Submit button to receive credit and continue with the next lesson.