JavaDeploy
SiteMap
JSP - Servlets
JDBC
EJB Concepts
Entity Beans
EJB Deployment
«Prev
Next»
Enterprise JavaBeans
EJB Architecture
EJB Clients Remote Objects
Transport Stubs Skeletons
Client Stub Proxy Pattern
Separating Business Logic
EJB Reusable Components
Object Monitors
Transactional Environment
Transactions Remote Objects
Distributed Objects
Stateful Stateless Beans
EJB Container Services
EJB Session Beans
Deployment Descriptor Jar
Client View Bean
Client Bean Relationship
Home Object Interface
Finding Home Object
Creating EJB Session
Calling EJB Business Methods
EJB Exception Handling
Bean Identity Session Handles
EJB Client Program
EJB Deployment
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:
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.
Select
Deploy Application
from the Tools menu.
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.
Enter the JNDI name "MyHello" when prompted. (Don't forget to press Enter after entering the name) Click the Next button to continue.
Select Finish. The application will now be deployed. Click the OK button when the deployment is complete.
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:
Shut down the deploytool.
Shut down the J2EE platform by killing the J2EE process.
Execute the command
cleanup
.
Restart the J2EE server.
Restart the deploytool.
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.