EJB Architecture  «Prev  Next»

Lesson 11EJB Component Deployment
ObjectiveWhat is involved in deploying a component in an Object Monitor?

EJB Component Deployment

How does a remote object get loaded into an Object Monitor?
The answer is known as "deployment".
The Object Monitor is usually built by a third-party vendor. You or your organization buys an Object Monitor to manage your remote objects.
What steps do you have to go through to deploy the remote object in that vendor's OM?
Please think about this before looking at the steps below.

Steps in preparing the remote object for deployment

Assuming that the remote object has already been written, you will have to:
  1. Create the stub and the skeleton for the remote object.
  2. Package the remote object, any classes it needs, plus deployment instructions, into some manageable form. The deployment instructions might indicate that the transfer() method requires a transaction.
  3. Load the remote object into the OM.
  4. Provide runtime information, which may contain the name and location of a database, the current tax rate, and the actual name of a local file that is required, containing some specific useful information, etc.
  5. Declare the transaction attributes of the methods of the remote object.
  6. Provide the service name that will be used to look up the remote object in the name service.

Vendor Parameters

This is not an exhaustive list, and it will vary depending on whose OM you are using.
Each vendor will have a different tool for you to use to perform the required steps and a different set of paramaters for you to edit. Furthermore, each remote object will require specific information, such as database URL or tax rate, etc.

Deploying the remote object

The OM will digest all this information, creating the appropriate stubs and skeletons, and load the remote object into the container. The deployment process will also add the stub and the service name to the name service.
The container will listen for messages from clients coming in from the server. At that point your remote object is ready to execute.

EJB Deployment - Quiz

Click the Quiz link below to take a short quiz on containers, servers, deployment, and transactions.
EJB Deployment - Quiz
In the next lesson, the topics discussed in this module will be reviewed.