DevPortal

How do I use Deploy Tool?


Table of Contents


How do I use Deploy Tool?

Pramati Server ships with a Deploy Tool that is installed by default when you install Pramati Server. The Deploy Tool enables you to deploy enterprise applications on any J2EE-compliant application server. Applications can be deployed on local or remote servers.

How do I Start Deploy Tool?

Important: Before you start the Deploy Tool, ensure that the server on which you want to deploy the application is running.

There are three ways to start the Deploy Tool:

How do I Start Deploy Tool in Windows?

To start the Deploy Tool on Windows, select Start > Programs > Pramati <version_no.> > Deploy Tool. This opens the Connect to Server dialog box. Provide the following details:

Click Connect or press Enter to open the Deploy Tool interface.

How do I Execute Batch File and Connect it to Server?

For Windows platforms, run rundeploytool.bat located in the directory <install_dir>/server/bin. For Unix platforms, run rundeploytool.sh located in the directory <install_dir>/server/bin. This opens the Connect to Server dialog box as shown above. Provide the required details and click Connect or press Enter to open the Deploy Tool interface.

How do I Start Deploy Tool Using Server Shell?

Alternatively, you can also start the Deploy Tool from the command shell of the Server. This is done using the deploytool command as below:
j2eeadmin@default> deploytool
Loading Server Environment
Starting DeployTool...
DeployTool successfully loaded
Deploy Tool invoked from the Server shell opens the Deploy Tool interface without prompting for the server details (the details are taken for the current instance). By default, it opens with a ‘No Archive Open’ message.

How does the Deploy Tool Interface look?

Deploy Tool has the following features:

How do I Prepare Applications for Deployment?

Select Archive > Open. The Open dialog box appears. Browse for the application that is to be deployed. Deploy Tool can open .jar, .war, .ear, and .rar files.

The tool obtains the following information from the Server:

For an undefined resource, add the resource through the Console. For details, read Configuring Resources.

Select Archive > Refresh Server Details to refresh the Server information displayed in the Deploy Tool. It is also possible to add resources to a running server.

How do I View Incomplete Tasks?

You cannot deploy an application without resolving all tasks with regard to the Server environment. The arrow in the lower right corner of the Deploy Tool is green when there are incomplete tasks. Click the green arrow to move to the next incomplete task. To view all the incomplete tasks, choose View > All Tasks.

Complete all pending tasks using the Next Task option and resolve all deployment tasks before deploying an application.

How do I use Deploy Tool to Resolve Tasks?

When you open an archive, Deploy Tool automatically detects required mappings and relationships. Incomplete mappings or unresolved references are listed as unresolved tasks. These tasks must be completed before the application can be deployed.

If the archive contains an entity bean or it requires to be connected to a database, use datasources to map the bean fields to the fields in the database table.

To resolve tasks using the Deploy Tool, do the following:

  1. In the main menu of the Deploy Tool, choose View > Next Task.
  2. Map the datasource name, table name, and fields in the application with the fields in the table. You may be required to resolve other tasks depending on the type and complexity of your application. For more information about setting resources to an application, read Preparing Applications for Deployment.
  3. After you resolve all incomplete tasks, the status bar indicates that the number of tasks left is 0. The application is now ready to be deployed.

Note: To ascertain the bean type, select the .jar option (say, bankejb.jar) in the tree view present on the left side. Select the bean you want to know the details about.

How do I Refresh Server Details?

Choose Archive > Refresh Server Details to refresh the Deploy Tool with the most recent Server details. This implies that to add datasources in the Server, you do not need to close and restart the Deploy Tool.

How do I Save Archives?

To save the opened archive, choose Archive > Save from the main menu in the Deploy Tool. The archive is saved along with the pramati-j2ee-server.xml and pramati-or-map.xml, every time it is deployed. You are prompted to save the archive before closing the archive, before closing the Deploy Tool, or on clicking Exit in the main menu.

What is a Prepared Archive?

A prepared archive (.par) is an archive that does not require code generation and compilation. It can be distributed across EJB server within the similar environment.

What does the Deployment Process Involve?

The deployment process involves:

  1. Generating runtime code.
  2. Compiling the generated code and running the remote method invocation compiler (RMIC). This is a time-consuming operation. The generated and compiled code is saved in <install_dir>/server/nodes/<node_name>/archives (jar) and in <install_dir>/server/nodes/<node_name>/archives/public_html (war). server_name is the name of the configured server on which the application has been deployed.
  3. Starting the prepared applications.

Code generation and RMIC operations usually delay the deployment process. On Pramati Server, you can generate code, perform RMIC, and start the prepared code at any point in time. You can then use the prepared code to build a .par without repeating the whole process.

How do I Prepare Code for Deployment?

Select Archives > Prepare from the main menu in the Deploy Tool to generate and build prepared code for both beans and Web components, and to perform RMIC.

How do I make Prepared Archives?

The code that has been prepared using the Prepare option can then be used to make a .par file. Choose Archive > Make Prepared Archive to display all applications that have been prepared using the Prepare or Deploy option.

After preparing the archive, save it in a file with a .par extension at <install_dir>/server/nodes/<node_name>/archives/parchive.

For example, selecting Archive > Make Prepared Archive > BankDesk.ear prepares and places the BankDesk.ear.par under <install_dir>/server/nodes/<node_name>/archives/parchives.

A .par file can be further distributed to any server where the application needs to be deployed. The .par files are particularly useful when applications that have been developed locally require to be deployed on the Internet.

Read Preparing and Deploying Web Applications for more information about distributing applications.

How do I Start Applications?

An archive that has been prepared for deployment using the Prepare option can be started by using Archive > Start in the main menu. Starting a prepared application completes the deployment process.

Using the Start option to deploy an application is faster than using the Deploy Tool because all the deployment tasks are already completed.

How do I Deploy Applications?

The application is ready to be deployed after all the deployment tasks have been resolved. Choose Archive > Deploy from the main menu to deploy the application. The progress bar displays the progress of the deployment process. To undeploy applications, choose Archive > Undeploy from the main menu.

How do I Access Deployed Applications?

After deploying an application, access it through any browser that supports HTML 3.2 and above. To access a deployed application, open the browser. Enter the location of the deployed application in the following format: http://<host on which the server is running>:<port number on which the server is listening>/<context root>/<first page of the application>

The deployment process requires the deployer to deploy Web applications and EJBs, and resolve any server-specific dependencies that may arise during deployment.


© Pramati Technologies 2007 Runs on Pramati Server | Feedback | Legal