DevPortal

How do I Deploy Exploded Archives?


Table of Contents

How do I Deploy Exploded Archives?

Enterprise applications that are in development phase often go through a lot of modifications and several rounds of testing. This requires re-deployment of the application archives as and when bugs are fixed or new features are added. It can be a real pain to deploy applications as they have to be archived and deployed every time changes are made.

Pramati Server now allows enterprise applications to be deployed right off the working directories. Here, the application is in an unzipped form (or unarchived form) and the deployment descriptors and application class files reside in the same directory. In short, applications need not be archived to be deployed every time changes are made.

What are the Pre-requisites for Deploying Exploded EARs?

To deploy an extracted application, the archive should be in a form as described below:

For example, to deploy an application, say BankDesk (shipped with the Server installable and available in the /samples directory) as an extracted ear, the directory structure should be as follows:

How do I Deploy Exploded EARs?

The deploy service selects an appropriate deploy handler for an archive and creates an application object. Once done, the steps are the same as other deployments as all manipulations are done through the application object.

Deployment features not supported by this implementation are:

How do I use Command Line to Deploy EARs?

The relevant commands in the J2EE Shell are:

All current flags that are available with these commands are fully valid for exploded .ear deployments.

j2eeadmin> deploy BankDesk.ear -validateappstart true
Where BankDesk.ear is the name of the exploded ear directory. Two new flags are available for this feature (valid for the above commands deploy and prepare). They are:

-classes

Usage: j2eeadmin> deploy BankDesk.ear -classes

The above code specifies that the application classes are to be found in a directory called classes under the module directory. This option does not take an argument for the classes directory. It just says that the application classes will be under a classes directory under the module directories.

For example, for the structure described above for BankDesk.ear, the class files (with full package structure) can be under a directory called classes under the directory BankEJB.jar. Once this flag is set, all application classes must be under the classes directory in all the jar/war/rar modules throughout the application.

If this flag is not set, it is assumed that the application classes are present in the modules itself.

-utiljars

-utiljars <utilJarDir> specifies the Util jar directory. This must be a directory name relative to the application root.

j2eeadmin> deploy BankDesk.ear -utiljars myUtilJars

where myUtilJars is a directory under the BankDesk.ear directory. The utilJar directory is a directory containing the utility classes used throughout the application.


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