In this lesson, the deployable jar file will be passed to the deploytool and then loaded into the J2EE platform.
The platform will examine the classes and build the home object, EJBObject, stubs, and skeletons.
The JNDI entry will be created and registered at this time.
If you have any trouble with these principles, please review the lesson EJB clients, servers, containers, and beans earlier in this course.
J2EE overview
The J2EE reference implementation is composed of two major programs:
Name
Description
deploytool
The deployer program
j2ee
The J2EE platform (server, container and JNDI)
The Diagram below illustrates the interaction between these two. Closely examine the activities and sequence of each step.
EJB deploy Tool jar
Client stubs and skeletons
The J2EE implementation provides the client with stubs and skeletons in a jar file that is created by the J2EE at deployment time. In the reference implementation, the client downloads only a small remote reference class to the home object from JNDI at lookup() time.
This class, which is a proxy for the remote object, invokes the stub when connecting to the bean's home object.
The client loads the stub from this jar file at run time. The name of the file for the Hello bean is HelloAppClient.jar.
Starting the programs
The deploytool and the J2EE platform must be executing in order to deploy the bean. They are started in different windows, as they run concurrently and communicate over the network.
The statements to execute the J2EE platform are:
j2ee -verbose
And to start the deployment tool:
deploytool
You must have networking, including DNS, fully installed and running on your system before executing these programs.
If you need help with this step please see your System Administrator. None of these programs will work without it.
Interacting with Deploytool
The following simulation illustrates the steps in deploying an application that uses the Hello bean. J2EE allows one or more beans to be combined
into an application. In this case, only the Hello bean will be used. The name of the application, HelloApp, is specified at deployment time as shown in the simulation.
Deploy Hello Bean
Deploy Bean - Exercise
Click the Exercise link below to deploy the Hello bean in the J2EE platform.
Deploy Bean - Exercise